org.codehaus.cargo.container.weblogic.internal
Class AbstractWebLogicInstalledLocalContainer

java.lang.Object
  extended by org.codehaus.cargo.util.log.LoggedObject
      extended by org.codehaus.cargo.container.spi.AbstractContainer
          extended by org.codehaus.cargo.container.spi.AbstractLocalContainer
              extended by org.codehaus.cargo.container.spi.AbstractInstalledLocalContainer
                  extended by org.codehaus.cargo.container.weblogic.internal.AbstractWebLogicInstalledLocalContainer
All Implemented Interfaces:
Container, InstalledLocalContainer, RunnableContainer, SpawnedContainer, LocalContainer, WebLogicLocalContainer, Loggable
Direct Known Subclasses:
WebLogic103xInstalledLocalContainer, WebLogic10xInstalledLocalContainer, WebLogic8xInstalledLocalContainer, WebLogic9xInstalledLocalContainer

public abstract class AbstractWebLogicInstalledLocalContainer
extends AbstractInstalledLocalContainer
implements WebLogicLocalContainer

Basic support for the WebLogic application server.

Version:
$Id: AbstractWebLogicInstalledLocalContainer.java 1892 2009-02-13 15:43:12Z adriancole $

Constructor Summary
AbstractWebLogicInstalledLocalContainer(LocalConfiguration configuration)
          
 
Method Summary
protected abstract  void addDefaultMemArgs(org.apache.tools.ant.taskdefs.Java java)
           
 void addDefaultMemArgsIfNotProvidedAsASystemProperty(org.apache.tools.ant.taskdefs.Java java)
          Users can override memory defaults through setting them via a system property.
 void doStart(org.apache.tools.ant.taskdefs.Java java)
          
 void doStop(org.apache.tools.ant.taskdefs.Java java)
          
 java.lang.String getBeaHome()
          The BEA_HOME is a root directory for various versions of WebLogic server.
protected  java.util.List getBeaHomeDirs()
           
protected  java.util.List getBeaHomeFiles()
           
 ContainerCapability getCapability()
          
 java.lang.String getDomainHome()
           
 java.lang.String getWeblogicHome()
          There are one or many WL_HOMEs per BEA_HOME.
protected  java.util.List getWeblogicHomeDirs()
           
protected  java.util.List getWeblogicHomeFiles()
           
 void initBeaHome()
          Check the WLS installation directory setting and if the beaHome attribute is not set, guess it.
 boolean memArgsProvidedAsASystemProperty()
          Scan the System properties provided by the user and determine if memory args are present.
 void setBeaHome(java.lang.String beaHome)
          Sets the Bea home directory.
protected  void verify()
           
protected  void verify(java.lang.String errorPrefix, java.lang.String errorSuffix, java.util.List requiredDirs, java.util.List requiredFiles)
          run through a list of expected files and directories that indicate a properly installed product.
protected  void verifyBeaHome()
          Verify that the Bea home directory structure is valid and throw a ContainerException if not.
protected  void verifyWeblogicHome()
          Verify that the Weblogic home directory structure is valid and throw a ContainerException if not.
 
Methods inherited from class org.codehaus.cargo.container.spi.AbstractInstalledLocalContainer
addExtraClasspath, addSharedClasspath, addToolsJarToClasspath, getAntUtils, getExtraClasspath, getHome, getHttpUtils, getJdkUtils, getResourceUtils, getSharedClasspath, getSystemProperties, getType, ifPresentAddPathToList, setExtraClasspath, setHome, setJvmToLaunchContainerIn, setLogger, setSharedClasspath, setSystemProperties, startInternal, stopInternal
 
Methods inherited from class org.codehaus.cargo.container.spi.AbstractLocalContainer
getConfiguration, getFileHandler, getOutput, getState, getTimeout, isAppend, setAppend, setConfiguration, setFileHandler, setOutput, setState, setTimeout, start, stop, waitForCompletion
 
Methods inherited from class org.codehaus.cargo.util.log.LoggedObject
getLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.codehaus.cargo.container.weblogic.WebLogicLocalContainer
getAutoDeployDirectory
 
Methods inherited from interface org.codehaus.cargo.container.LocalContainer
getConfiguration, getFileHandler, setConfiguration, setFileHandler
 
Methods inherited from interface org.codehaus.cargo.container.Container
getId, getName, getState, getType
 
Methods inherited from interface org.codehaus.cargo.util.log.Loggable
getLogger, setLogger
 
Methods inherited from interface org.codehaus.cargo.container.internal.RunnableContainer
getOutput, getTimeout, isAppend, setAppend, setOutput, setTimeout, start, stop
 

Constructor Detail

AbstractWebLogicInstalledLocalContainer

public AbstractWebLogicInstalledLocalContainer(LocalConfiguration configuration)

See Also:
AbstractInstalledLocalContainer.AbstractInstalledLocalContainer(LocalConfiguration)
Method Detail

setBeaHome

public final void setBeaHome(java.lang.String beaHome)
Sets the Bea home directory.

Parameters:
beaHome - The BEA home directory

getCapability

public final ContainerCapability getCapability()

Specified by:
getCapability in interface Container
See Also:
Container.getCapability()

verify

protected final void verify()
Overrides:
verify in class AbstractInstalledLocalContainer
See Also:
AbstractLocalContainer.verify()

getBeaHomeFiles

protected java.util.List getBeaHomeFiles()
Returns:
a list of files that indicate a properly installed BEA_HOME

getBeaHomeDirs

protected java.util.List getBeaHomeDirs()
Returns:
a list of directories that indicate a properly installed BEA_HOME

getWeblogicHomeFiles

protected java.util.List getWeblogicHomeFiles()
Returns:
a list of files that indicate a properly installed WL_HOME

getWeblogicHomeDirs

protected java.util.List getWeblogicHomeDirs()
Returns:
a list of directories that indicate a properly installed WL_HOME

verifyWeblogicHome

protected void verifyWeblogicHome()
Verify that the Weblogic home directory structure is valid and throw a ContainerException if not.

Throws:
ContainerException - if any

verifyBeaHome

protected void verifyBeaHome()
Verify that the Bea home directory structure is valid and throw a ContainerException if not.

Throws:
ContainerException - if any

verify

protected void verify(java.lang.String errorPrefix,
                      java.lang.String errorSuffix,
                      java.util.List requiredDirs,
                      java.util.List requiredFiles)
run through a list of expected files and directories that indicate a properly installed product.

Parameters:
errorPrefix - - Prefix to the ContainerException, if a file or directory is missing
errorSuffix - - Suffix o the above
requiredDirs - - Directories that are required to exist
requiredFiles - - Files that are required to exist
Throws:
ContainerException - - if a file or directory isn't present as expected

initBeaHome

public final void initBeaHome()
Check the WLS installation directory setting and if the beaHome attribute is not set, guess it.


addDefaultMemArgsIfNotProvidedAsASystemProperty

public void addDefaultMemArgsIfNotProvidedAsASystemProperty(org.apache.tools.ant.taskdefs.Java java)
Users can override memory defaults through setting them via a system property.

Parameters:
java - - object to insert mem arguments if required

memArgsProvidedAsASystemProperty

public boolean memArgsProvidedAsASystemProperty()
Scan the System properties provided by the user and determine if memory args are present.

Returns:
- true if jvm args were passed and contain memory arguments

addDefaultMemArgs

protected abstract void addDefaultMemArgs(org.apache.tools.ant.taskdefs.Java java)
Parameters:
java - - runtime configuration to insert default memory args into

doStart

public final void doStart(org.apache.tools.ant.taskdefs.Java java)
                   throws java.lang.Exception

Specified by:
doStart in class AbstractInstalledLocalContainer
Throws:
java.lang.Exception
See Also:
AbstractInstalledLocalContainer.doStart(Java)

doStop

public final void doStop(org.apache.tools.ant.taskdefs.Java java)
                  throws java.lang.Exception

Specified by:
doStop in class AbstractInstalledLocalContainer
Throws:
java.lang.Exception
See Also:
AbstractInstalledLocalContainer.doStop(Java)

getBeaHome

public java.lang.String getBeaHome()
Description copied from interface: WebLogicLocalContainer
The BEA_HOME is a root directory for various versions of WebLogic server. Multiple BEA_HOMEs may exist on a machine, and any changes to this folder will affect all configurations that use it. The BEA_HOME is read-only to running processes. It is modified when patching or installing new versions of WebLogic.

Specified by:
getBeaHome in interface WebLogicLocalContainer
Returns:
the BEA_HOME
See Also:
weblogic.internal.WebLogicLocalContainer

getDomainHome

public java.lang.String getDomainHome()
Returns:
the DOMAIN_HOME
See Also:
weblogic.internal.WebLogicLocalContainer

getWeblogicHome

public java.lang.String getWeblogicHome()
Description copied from interface: WebLogicLocalContainer
There are one or many WL_HOMEs per BEA_HOME. This path contains the versioned WebLogic libraries used by running configurations. This area is typically read-only to running processes. It is modified when patching or adding new extensions to an existing version of WebLogic.

Specified by:
getWeblogicHome in interface WebLogicLocalContainer
Returns:
the WL_HOME
See Also:
weblogic.internal.WebLogicLocalContainer


Copyright © 2004-2011 Codehaus. All Rights Reserved.