org.objectweb.jonas.ear
Class EarServiceImpl
java.lang.Object
|
+--org.objectweb.jonas.management.ReconfigDispatcher
|
+--org.objectweb.jonas.service.AbsServiceImpl
|
+--org.objectweb.jonas.ear.EarServiceImpl
- All Implemented Interfaces:
- EarService, EarServiceImplMBean, javax.management.NotificationBroadcaster, ReconfigDispatcherMBean, Service
- public class EarServiceImpl
- extends AbsServiceImpl
- implements EarService, EarServiceImplMBean
JOnAS EAR Service Implementation class.
This class provides an implementation of the ear service.
- Author:
- Florent Benoit, Ludovic Bert
Contributor(s):
Adriana Danes: highlight configuration properties
Field Summary |
protected static java.lang.String |
APPS_DIR
The name of the apps directory. |
static java.lang.String |
AUTOLOADDIR
|
static java.lang.String |
CLASS
|
static java.lang.String |
DESCRIPTORS
The Ear service configuration properties |
protected static java.lang.String |
JONAS_BASE
The name of the JONAS_BASE directory. |
static java.lang.String |
PARSINGWITHVALIDATION
|
Method Summary |
void |
deployEar(javax.naming.Context ctx)
Deploy an EAR file with sending JAR file to the EJB container and WAR
file to the WEB container. |
void |
deployEarMBean(java.lang.String fileName)
Deploy an EAR by delegating the operation to the deployEar() method.
|
protected void |
doInit(javax.naming.Context ctx)
Init the EAR service. |
protected void |
doStart()
Start the EAR service. |
protected void |
doStop()
Stop the EAR service. |
java.lang.Integer |
getCurrentNumberOfEars()
|
java.util.Set |
getEarNames()
This method is added temporarily. |
void |
unDeployEar(javax.naming.Context ctx)
Undeploy an EAR by sending the request to the EJB container and to the
WEB container. |
void |
unDeployEarMBean(java.lang.String fileName)
Undeploy an EAR by delegating the operation to the unDeployEar() method.
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JONAS_BASE
protected static final java.lang.String JONAS_BASE
- The name of the JONAS_BASE directory.
APPS_DIR
protected static final java.lang.String APPS_DIR
- The name of the apps directory.
DESCRIPTORS
public static final java.lang.String DESCRIPTORS
- The Ear service configuration properties
AUTOLOADDIR
public static final java.lang.String AUTOLOADDIR
PARSINGWITHVALIDATION
public static final java.lang.String PARSINGWITHVALIDATION
CLASS
public static final java.lang.String CLASS
EarServiceImpl
public EarServiceImpl()
doInit
protected void doInit(javax.naming.Context ctx)
throws ServiceException
- Init the EAR service.
- Overrides:
doInit
in class AbsServiceImpl
- Parameters:
ctx
- the configuration of the Ear service.- Throws:
ServiceException
- if the initialization failed.
doStop
protected void doStop()
throws ServiceException
- Stop the EAR service.
- Overrides:
doStop
in class AbsServiceImpl
- Throws:
ServiceException
- if the stop failed.
deployEar
public void 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.
- Specified by:
deployEar
in interface EarService
- Parameters:
ctx
- the context which contains the configuration in order to
deploy an EAR.- Throws:
EarServiceException
- if the deployment of the EAR failed.
deployEarMBean
public void deployEarMBean(java.lang.String fileName)
throws java.rmi.RemoteException,
EarServiceException
- Deploy an EAR by delegating the operation to the deployEar() method.
This is used for JMX management.
- Specified by:
deployEarMBean
in interface EarServiceImplMBean
- Parameters:
fileName
- the fileName of the ear which must be be deployed.- Throws:
java.rmi.RemoteException
- if rmi call failed.EarServiceException
- if the deployment of the EAR failed.
doStart
protected void doStart()
throws ServiceException
- Start the EAR service.
- Overrides:
doStart
in class AbsServiceImpl
- Throws:
ServiceException
- if the startup 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.
- Specified by:
unDeployEar
in interface EarService
- Parameters:
ctx
- the context which contains the configuration in order to
undeploy an EAR.- Throws:
EarServiceException
- if the undeployment of the EAR failed.
unDeployEarMBean
public void unDeployEarMBean(java.lang.String fileName)
throws java.rmi.RemoteException,
EarServiceException
- Undeploy an EAR by delegating the operation to the unDeployEar() method.
This is used for JMX management.
- Specified by:
unDeployEarMBean
in interface EarServiceImplMBean
- Parameters:
fileName
- the fileName of the ear which must be be undeployed.- Throws:
java.rmi.RemoteException
- if rmi call failed.EarServiceException
- if the undeployment of the EAR failed.
getCurrentNumberOfEars
public java.lang.Integer getCurrentNumberOfEars()
- Specified by:
getCurrentNumberOfEars
in interface EarServiceImplMBean
- Returns:
- current number of ears deployed in the JOnAS server
getEarNames
public java.util.Set getEarNames()
- This method is added temporarily. It will disapear when Ears will have their associated MBeans
(when Ears will become manageable)
- Specified by:
getEarNames
in interface EarServiceImplMBean
- Returns:
- the names of the ears currently deployed in the JOnAS server