org.objectweb.jonas.ear
Interface EarService

All Superinterfaces:
Service
All Known Implementing Classes:
EarServiceImpl

public interface EarService
extends Service

JOnAS EAR Service interface. This interface provides a description of an EAR service.

Author:
Ludovic Bert, Florent Benoit

Method Summary
 java.lang.String deployEar(javax.naming.Context ctx)
          Deploy an EAR file with sending JAR file to the EJB container and WAR file to the WEB container.
 java.lang.String deployEar(java.lang.String fileName)
          Deploy an EAR, used by management applications via J2EEServer managed object
 java.lang.String getAppsDirectory()
          Return the Apps directory.
 java.lang.Boolean isEarDeployed(java.lang.String fileName)
          Test if the specified filename is already deployed or not.
 boolean isEarDeployedByUnpackName(java.lang.String unpackName)
          Test if the specified unpack name is already deployed or not.
 void unDeployEar(javax.naming.Context ctx)
          Undeploy an EAR by sending the request to the EJB container and to the WEB container.
 void unDeployEar(java.lang.String fileName)
          Undeploy an EAR, used by management applications via J2EEServer managed object
 
Methods inherited from interface org.objectweb.jonas.service.Service
getName, init, isStarted, setName, start, stop
 

Method Detail

deployEar

public java.lang.String deployEar(javax.naming.Context ctx)
                           throws EarServiceException
Deploy an EAR file with sending JAR file to the EJB container and WAR file to the WEB container.

Parameters:
ctx - the context which contains the configuration in order to deploy an EAR.
Returns:
The ObjectName of the J2EE Application MBean associated to the deployed EAR
Throws:
EarServiceException - if the deployment of the EAR failed.

unDeployEar

public void unDeployEar(javax.naming.Context ctx)
                 throws EarServiceException
Undeploy an EAR by sending the request to the EJB container and to the WEB container.

Parameters:
ctx - the context which contains the configuration in order to undeploy an EAR.
Throws:
EarServiceException - if the undeployment of the EAR failed.

deployEar

public java.lang.String deployEar(java.lang.String fileName)
                           throws java.lang.Exception
Deploy an EAR, used by management applications via J2EEServer managed object

Parameters:
fileName - the fileName of the ear which must be be deployed.
Returns:
The ObjectName of the MBean associated to the deployed J2EE Application
Throws:
java.lang.Exception - if the deployment of the EAR failed.

isEarDeployed

public java.lang.Boolean isEarDeployed(java.lang.String fileName)
Test if the specified filename is already deployed or not.

Parameters:
fileName - the name of the ear file.
Returns:
true if the ear is deployed, else false.

isEarDeployedByUnpackName

public boolean isEarDeployedByUnpackName(java.lang.String unpackName)
Test if the specified unpack name is already deployed or not. This method is defined in the EarService interface.

Parameters:
unpackName - the name of the ear file.
Returns:
true if the ear is deployed, else false.

unDeployEar

public void unDeployEar(java.lang.String fileName)
                 throws java.lang.Exception
Undeploy an EAR, used by management applications via J2EEServer managed object

Parameters:
fileName - the fileName of the ear which must be be undeployed.
Throws:
java.lang.Exception - if the undeployment of the EAR failed.

getAppsDirectory

public java.lang.String getAppsDirectory()
Return the Apps directory.

Returns:
The Apps directory