Class AbstractWebLogicInstalledLocalContainer
- java.lang.Object
-
- org.codehaus.cargo.util.log.LoggedObject
-
- org.codehaus.cargo.container.spi.AbstractContainer
-
- org.codehaus.cargo.container.spi.AbstractLocalContainer
-
- org.codehaus.cargo.container.spi.AbstractInstalledLocalContainer
-
- org.codehaus.cargo.container.weblogic.internal.AbstractWebLogicInstalledLocalContainer
-
- All Implemented Interfaces:
Container
,InstalledLocalContainer
,RunnableContainer
,SpawnedContainer
,LocalContainer
,WebLogicLocalContainer
,Loggable
- Direct Known Subclasses:
WebLogic103xInstalledLocalContainer
,WebLogic10xInstalledLocalContainer
,WebLogic121xInstalledLocalContainer
,WebLogic12xInstalledLocalContainer
,WebLogic8xInstalledLocalContainer
,WebLogic9xInstalledLocalContainer
public abstract class AbstractWebLogicInstalledLocalContainer extends AbstractInstalledLocalContainer implements WebLogicLocalContainer
Basic support for the WebLogic application server.
-
-
Constructor Summary
Constructors Constructor Description AbstractWebLogicInstalledLocalContainer(LocalConfiguration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addWeblogicAdminArguments(JvmLauncher java)
Add WebLogic admin arguments.void
doStart(JvmLauncher java)
Implementation ofRunnableContainer.start()
that all containers extending this class must implement.void
doStop(JvmLauncher java)
Implementation ofRunnableContainer.stop()
that all containers extending this class must implement.protected void
executePostStartTasks()
Some containers may require some extra steps after startup.String
getBeaHome()
The BEA_HOME is a root directory for various versions of WebLogic server.protected List<String>
getBeaHomeDirs()
protected List<String>
getBeaHomeFiles()
ContainerCapability
getCapability()
String
getVersion(String defaultVersion)
Parse installed WebLogic version.String
getWeblogicHome()
There are one or many WL_HOMEs per BEA_HOME.protected List<String>
getWeblogicHomeDirs()
protected List<String>
getWeblogicHomeFiles()
void
initBeaHome()
Check the WLS installation directory setting and if the beaHome attribute is not set, guess it.void
setBeaHome(String beaHome)
Sets the Bea home directory.protected void
verify()
Verify required properties have been set before executing any action.protected void
verify(String errorPrefix, String errorSuffix, List<String> requiredDirs, List<String> 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, addExtraClasspath, addMemoryArguments, addRuntimeArgs, addSharedClasspath, addToolsJarToClasspath, createJvmLauncher, forceStopInternal, getExtraClasspath, getHome, getHttpUtils, getJavaHome, getJvmLauncherFactory, getResourceUtils, getSharedClasspath, getSystemProperties, getType, ifPresentAddPathToList, setExtraClasspath, setHome, setJvmLauncherFactory, setJvmToLaunchContainerIn, setLogger, setSharedClasspath, setSystemProperties, startInternal, stopInternal
-
Methods inherited from class org.codehaus.cargo.container.spi.AbstractLocalContainer
getConfiguration, getFileHandler, getOutput, getState, getTimeout, isAppend, restart, setAppend, setConfiguration, setFileHandler, setOutput, setState, setTimeout, start, stop, waitForCompletion, waitForPortShutdown, waitForStarting
-
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.Container
getId, getName, getState, getType
-
Methods inherited from interface org.codehaus.cargo.container.LocalContainer
getConfiguration, getFileHandler, setConfiguration, setFileHandler
-
Methods inherited from interface org.codehaus.cargo.container.internal.RunnableContainer
getOutput, getTimeout, isAppend, restart, setAppend, setOutput, setTimeout, start, stop
-
Methods inherited from interface org.codehaus.cargo.container.weblogic.internal.WebLogicLocalContainer
getAutoDeployDirectory
-
-
-
-
Constructor Detail
-
AbstractWebLogicInstalledLocalContainer
public AbstractWebLogicInstalledLocalContainer(LocalConfiguration configuration)
-
-
Method Detail
-
setBeaHome
public void setBeaHome(String beaHome)
Sets the Bea home directory.- Parameters:
beaHome
- The BEA home directory
-
getCapability
public ContainerCapability getCapability()
- Specified by:
getCapability
in interfaceContainer
- Returns:
- the
ContainerCapability
of the container in term of ability to deploy such and such type ofDeployable
s (eg WAR, EAR, etc).
-
verify
protected final void verify()
Verify required properties have been set before executing any action.- Overrides:
verify
in classAbstractInstalledLocalContainer
-
getBeaHomeFiles
protected List<String> getBeaHomeFiles()
- Returns:
- a list of files that indicate a properly installed BEA_HOME
-
getBeaHomeDirs
protected List<String> getBeaHomeDirs()
- Returns:
- a list of directories that indicate a properly installed BEA_HOME
-
getWeblogicHomeFiles
protected List<String> getWeblogicHomeFiles()
- Returns:
- a list of files that indicate a properly installed WL_HOME
-
getWeblogicHomeDirs
protected List<String> 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.
-
verifyBeaHome
protected void verifyBeaHome()
Verify that the Bea home directory structure is valid and throw a ContainerException if not.
-
verify
protected void verify(String errorPrefix, String errorSuffix, List<String> requiredDirs, List<String> 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 missingerrorSuffix
- - Suffix o the aboverequiredDirs
- - Directories that are required to existrequiredFiles
- - Files that are required to exist
-
initBeaHome
public void initBeaHome()
Check the WLS installation directory setting and if the beaHome attribute is not set, guess it.
-
doStart
public void doStart(JvmLauncher java) throws Exception
Implementation ofRunnableContainer.start()
that all containers extending this class must implement.- Specified by:
doStart
in classAbstractInstalledLocalContainer
- Parameters:
java
- the predefined JVM launcher to use to start the container- Throws:
Exception
- if any error is raised during the container start
-
executePostStartTasks
protected void executePostStartTasks() throws Exception
Some containers may require some extra steps after startup.. Define the CARGO servlet users in WebLogic.- Overrides:
executePostStartTasks
in classAbstractLocalContainer
- Throws:
Exception
- if any error is raised during these executions
-
doStop
public void doStop(JvmLauncher java) throws Exception
Implementation ofRunnableContainer.stop()
that all containers extending this class must implement.- Specified by:
doStop
in classAbstractInstalledLocalContainer
- Parameters:
java
- the predefined JVM launcher to use to stop the container- Throws:
Exception
- if any error is raised during the container stop
-
addWeblogicAdminArguments
protected void addWeblogicAdminArguments(JvmLauncher java)
Add WebLogic admin arguments.- Parameters:
java
- Java launcher.
-
getBeaHome
public String getBeaHome()
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 interfaceWebLogicLocalContainer
- Returns:
- The BEA_HOME of this WebLogic installation.
-
getWeblogicHome
public String getWeblogicHome()
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 interfaceWebLogicLocalContainer
- Returns:
- The WL_HOME, or version-specific installation
-
getVersion
public String getVersion(String defaultVersion)
Parse installed WebLogic version.- Specified by:
getVersion
in interfaceWebLogicLocalContainer
- Parameters:
defaultVersion
- the version used if the exact WebLogic version can't be determined- Returns:
- the WebLogic version, or
defaultVersion
if the version number could not be determined.
-
-