Class AbstractJonas5xRemoteDeployer
- java.lang.Object
-
- org.codehaus.cargo.util.log.LoggedObject
-
- org.codehaus.cargo.container.spi.deployer.AbstractDeployer
-
- org.codehaus.cargo.container.spi.deployer.AbstractRemoteDeployer
-
- org.codehaus.cargo.container.jonas.internal.AbstractJonasRemoteDeployer
-
- org.codehaus.cargo.container.jonas.internal.AbstractJonas5xRemoteDeployer
-
- Direct Known Subclasses:
Jonas5xJsr160RemoteDeployer
,Jonas5xMEJBRemoteDeployer
public abstract class AbstractJonas5xRemoteDeployer extends AbstractJonasRemoteDeployer
Remote deployer for JOnAS 5.x.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.codehaus.cargo.container.jonas.internal.AbstractJonasRemoteDeployer
AbstractJonasRemoteDeployer.ActionType, AbstractJonasRemoteDeployer.RemoteDeployerConfig, AbstractJonasRemoteDeployer.TargetType
-
-
Field Summary
-
Fields inherited from class org.codehaus.cargo.container.jonas.internal.AbstractJonasRemoteDeployer
configuration
-
-
Constructor Summary
Constructors Constructor Description AbstractJonas5xRemoteDeployer(RemoteContainer container)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deploy(Deployable deployable)
Deploy aDeployable
to the running container and make it available for requests.protected String
findRemoteFileName(Deployable deployable, String deployableIdentifier, boolean askFromServer)
Finds a deployable file on the remote server.protected String
getDeploymentAttributeName(ObjectName depmonitor, MBeanServerConnection mbsc)
Get the attribute name for the "development" attribute.protected ObjectName
getDepmonitorServiceMBeanName(String domainName)
Get the depmonitor service MBean.protected String
getOperationName(AbstractJonasRemoteDeployer.ActionType actionType, DeployableType deployableType, AbstractJonasRemoteDeployer.TargetType targetType)
Returns the operation name for the given deployable and action type.protected String
getRemoteFileName(Deployable deployable, String deployableIdentifier, boolean askFromServer)
Get the remote file name.void
redeploy(Deployable deployable)
Redeploy aDeployable
already deployed to the running container.void
redeploy(Deployable deployable, DeployableMonitor monitor)
Redeploy aDeployable
already deployed to the running container.void
undeploy(Deployable deployable)
Undeploy aDeployable
from the running container.-
Methods inherited from class org.codehaus.cargo.container.jonas.internal.AbstractJonasRemoteDeployer
getConfig, getDomainMBeanName, getMBeanServerConnectionFactory, getServerMBeanName
-
Methods inherited from class org.codehaus.cargo.container.spi.deployer.AbstractRemoteDeployer
getContainer, getType
-
Methods inherited from class org.codehaus.cargo.container.spi.deployer.AbstractDeployer
deploy, deploy, redeploy, start, start, stop, stop, undeploy
-
Methods inherited from class org.codehaus.cargo.util.log.LoggedObject
getLogger, setLogger
-
-
-
-
Constructor Detail
-
AbstractJonas5xRemoteDeployer
public AbstractJonas5xRemoteDeployer(RemoteContainer container)
Constructor.- Parameters:
container
- the remote container
-
-
Method Detail
-
getOperationName
protected String getOperationName(AbstractJonasRemoteDeployer.ActionType actionType, DeployableType deployableType, AbstractJonasRemoteDeployer.TargetType targetType)
Returns the operation name for the given deployable and action type.- Specified by:
getOperationName
in classAbstractJonasRemoteDeployer
- Parameters:
actionType
- Action type.deployableType
- Deployable type.targetType
- Target type.- Returns:
- Operation name.
-
deploy
public void deploy(Deployable deployable)
Deploy aDeployable
to the running container and make it available for requests.- Specified by:
deploy
in interfaceDeployer
- Overrides:
deploy
in classAbstractJonasRemoteDeployer
- Parameters:
deployable
- theDeployable
to deploy
-
undeploy
public void undeploy(Deployable deployable)
Undeploy aDeployable
from the running container. The service becomes unavailable for requests.- Specified by:
undeploy
in interfaceDeployer
- Overrides:
undeploy
in classAbstractJonasRemoteDeployer
- Parameters:
deployable
- theDeployable
to undeploy
-
getDepmonitorServiceMBeanName
protected ObjectName getDepmonitorServiceMBeanName(String domainName) throws MalformedObjectNameException
Get the depmonitor service MBean.- Parameters:
domainName
- domain Name- Returns:
- the depmonitor service MBean Name
- Throws:
MalformedObjectNameException
- throwing when object name is wrong
-
getDeploymentAttributeName
protected String getDeploymentAttributeName(ObjectName depmonitor, MBeanServerConnection mbsc) throws Throwable
Get the attribute name for the "development" attribute. That name depends on the exact server version (developmentMode
on JonAS 5.0.x and 5.1.x,development
on JOnAS 5.2.x and afterwards).- Parameters:
depmonitor
- Object name of the depmonitor service.mbsc
- MBean server connection.- Returns:
- the attribute name for the "development" attribute.
- Throws:
Throwable
- If anything fails.
-
findRemoteFileName
protected String findRemoteFileName(Deployable deployable, String deployableIdentifier, boolean askFromServer)
Finds a deployable file on the remote server.- Parameters:
deployable
- Deployable to look for.deployableIdentifier
- Deployable identifier.askFromServer
- Whether to ask from server, onlyfalse
during tests.- Returns:
- String if found,
null
if nothing found.
-
getRemoteFileName
protected String getRemoteFileName(Deployable deployable, String deployableIdentifier, boolean askFromServer)
Get the remote file name.- Specified by:
getRemoteFileName
in classAbstractJonasRemoteDeployer
- Parameters:
deployable
- the deployable Object.deployableIdentifier
- the deployable object ID.askFromServer
- whether to ask from server (in order to have a full path).- Returns:
- the remote file Name.
-
redeploy
public void redeploy(Deployable deployable, DeployableMonitor monitor)
Redeploy a
Deployable
already deployed to the running container. The service becomes available for requests.Note that this method will be unsupported by the
Deployer
s based on theAbstractCopyingInstalledLocalDeployer
.- Specified by:
redeploy
in interfaceDeployer
- Overrides:
redeploy
in classAbstractDeployer
- Parameters:
deployable
- theDeployable
to redeploymonitor
- the monitor that checks for deployment status- See Also:
Deployer.deploy(Deployable)
,Deployer.undeploy(Deployable)
-
redeploy
public void redeploy(Deployable deployable)
Redeploy a
Deployable
already deployed to the running container. The service becomes available for requests.Note that this method will be unsupported by the
Deployer
s based on theAbstractCopyingInstalledLocalDeployer
.- Specified by:
redeploy
in interfaceDeployer
- Overrides:
redeploy
in classAbstractDeployer
- Parameters:
deployable
- theDeployable
to redeploy- See Also:
Deployer.deploy(Deployable)
,Deployer.undeploy(Deployable)
-
-