org.objectweb.jonas.ear.EarServiceImpl Class Reference

Inherits org.objectweb.jonas.ear.EarService, and org.objectweb.jonas.ear.EarServiceImplMBean.

Inheritance diagram for org.objectweb.jonas.ear.EarServiceImpl:

Inheritance graph
[legend]
Collaboration diagram for org.objectweb.jonas.ear.EarServiceImpl:

Collaboration graph
[legend]
List of all members.

Public Member Functions

String deployEar (Context ctx) throws EarServiceException
String deployEar (String fileName) throws Exception
String deployEarMBean (String fileName) throws Exception
void unDeployEar (Context ctx) throws EarServiceException
void unDeployEar (String fileName) throws Exception
void unDeployEarMBean (String fileName) throws Exception
Integer getCurrentNumberOfEars ()
List getInstalledEars () throws Exception
Set getEarNames ()
boolean isEarLoaded (String fileName)
Boolean isEarDeployed (String fileName)
boolean isEarDeployedByUnpackName (String unpackName)
List getDeployedEars ()
List getDeployableEars () throws Exception
List getAutoloadDirectories ()
String getAppsDirectory ()

Static Public Member Functions

String buildJ2eeApplicationName (URL pUrl)
String buildJ2eeApplicationName (String pFilename)

Protected Member Functions

void doInit (Context ctx) throws ServiceException
void doStop () throws ServiceException
void doStart () throws ServiceException

Static Protected Attributes

final String JONAS_BASE = JProp.getJonasBase()
final String APPS_DIR = JONAS_BASE + File.separator + "apps"
final String WORK_DIR = JProp.getWorkDir()
final String WORK_APPS_DIR = WORK_DIR + File.separator + "apps"
final String DESCRIPTORS = "jonas.service.ear.descriptors"
final String AUTOLOADDIR = "jonas.service.ear.autoloaddir"
final String PARSINGWITHVALIDATION = "jonas.service.ear.parsingwithvalidation"
final String CLASS = "jonas.service.ear.class"

Detailed Description

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 Eric Hardesty: added ability to include rar files in an ear Michel-Ange Anton : new JSR77 MBean

Definition at line 119 of file EarServiceImpl.java.


Member Function Documentation

String org.objectweb.jonas.ear.EarServiceImpl.buildJ2eeApplicationName String  pFilename  )  [static]
 

Build the J2EEApplication name.

Parameters:
pFilename The name of Ear file
Returns:
The J2EEApplication name

Definition at line 1669 of file EarServiceImpl.java.

References org.objectweb.jonas.ear.Ear.getName().

Here is the call graph for this function:

String org.objectweb.jonas.ear.EarServiceImpl.buildJ2eeApplicationName URL  pUrl  )  [static]
 

Build the J2EEApplication name.

Parameters:
pUrl The URL of Ear file
Returns:
The J2EEApplication name

Definition at line 1649 of file EarServiceImpl.java.

References org.objectweb.jonas.ear.Ear.getName().

Referenced by org.objectweb.jonas.ear.EarServiceImpl.deployEar().

Here is the call graph for this function:

String org.objectweb.jonas.ear.EarServiceImpl.deployEar String  fileName  )  throws Exception
 

Deploy an ear with its given fileName

Parameters:
fileName file to deploy (ear)
Returns:
The ObjectName of the J2EE Application MBean associated to the deployed EAR
Exceptions:
Exception if the deployment of the EAR failed.
See also:
org.objectweb.jonas.ear.EarService.deployEar(java.lang.String)

Implements org.objectweb.jonas.ear.EarService.

Definition at line 1124 of file EarServiceImpl.java.

References org.objectweb.jonas.ear.EarServiceImpl.deployEarMBean().

Here is the call graph for this function:

String org.objectweb.jonas.ear.EarServiceImpl.deployEar Context  ctx  )  throws EarServiceException
 

Deploy an EAR file with sending JAR file to the EJB container and WAR file to the WEB container and RAR file to the resource service.

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 the Application Container
Exceptions:
EarServiceException if the deployment of the EAR failed.

Now this is the deployment step with sending + rars to the rar service + jars to the ejb service + wars to the web container service + jars and wars to web services service

Ejb ClassLoader is needed for WebServices deployment so We create it in advance ...

Implements org.objectweb.jonas.ear.EarService.

Definition at line 418 of file EarServiceImpl.java.

References org.objectweb.jonas.ear.EarServiceImpl.APPS_DIR, org.objectweb.jonas.ear.EarServiceImpl.buildJ2eeApplicationName(), org.objectweb.jonas_ear.deployment.api.EarDeploymentDesc.getAltDDClients(), org.objectweb.jonas_ear.deployment.api.EarDeploymentDesc.getAltDDConnectors(), org.objectweb.jonas_ear.deployment.api.EarDeploymentDesc.getAltDDEjbs(), org.objectweb.jonas_ear.deployment.api.EarDeploymentDesc.getAltDDWebs(), org.objectweb.jonas_ear.deployment.api.EarDeploymentDesc.getClientTags(), org.objectweb.jonas_ear.deployment.api.EarDeploymentDesc.getConnectorTags(), org.objectweb.jonas_ear.deployment.xml.Web.getContextRoot(), org.objectweb.jonas_ear.deployment.api.EarDeploymentDesc.getEjbTags(), org.objectweb.jonas_client.deployment.api.ClientContainerDeploymentDesc.getJOnASXmlContent(), org.objectweb.jonas.service.Service.getName(), org.objectweb.jonas.ear.lib.EarClassPathManager.getResolvedClassPath(), org.objectweb.jonas_ear.deployment.api.EarDeploymentDesc.getSecurityRolesNames(), org.objectweb.jonas.ear.lib.JarList.getURLs(), org.objectweb.jonas_ear.deployment.api.EarDeploymentDesc.getUserToRoleMapping(), org.objectweb.jonas_ear.deployment.api.EarDeploymentDesc.getWebTags(), org.objectweb.jonas_ear.deployment.xml.Web.getWebUri(), org.objectweb.jonas_ear.deployment.api.EarDeploymentDesc.getXmlContent(), org.objectweb.jonas_client.deployment.api.ClientContainerDeploymentDesc.getXmlContent(), org.objectweb.jonas.naming.CompNamingContext.rebind(), org.objectweb.jonas_client.deployment.api.ClientContainerDeploymentDesc.toString(), and org.objectweb.jonas.ear.EarServiceImpl.WORK_APPS_DIR.

Referenced by org.objectweb.jonas.ear.EarServiceImpl.deployEarMBean(), and org.objectweb.jonas.ear.EarServiceImpl.doStart().

Here is the call graph for this function:

String org.objectweb.jonas.ear.EarServiceImpl.deployEarMBean String  fileName  )  throws Exception
 

Deploy an EAR by delegating the operation to the deployEar() method. This is used by jonasAdmin management application.

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

Implements org.objectweb.jonas.ear.EarServiceImplMBean.

Definition at line 1136 of file EarServiceImpl.java.

References org.objectweb.jonas.ear.EarServiceImpl.deployEar().

Referenced by org.objectweb.jonas.ear.EarServiceImpl.deployEar().

Here is the call graph for this function:

void org.objectweb.jonas.ear.EarServiceImpl.doInit Context  ctx  )  throws ServiceException [protected]
 

Init the EAR service.

Parameters:
ctx the configuration of the Ear service.
Exceptions:
ServiceException if the initialization failed.

Definition at line 227 of file EarServiceImpl.java.

References org.objectweb.jonas.ear.EarServiceImpl.APPS_DIR, org.objectweb.jonas.ear.EarServiceImpl.AUTOLOADDIR, org.objectweb.jonas.ear.EarServiceImpl.DESCRIPTORS, org.objectweb.jonas.server.LoaderManager.getAppsLoader(), org.objectweb.jonas.service.ServiceManager.getEjbService(), org.objectweb.jonas.service.ServiceManager.getInstance(), org.objectweb.jonas.service.ServiceManager.getJmxService(), org.objectweb.jonas.service.ServiceManager.getResourceService(), org.objectweb.jonas.service.ServiceManager.getWebContainerService(), org.objectweb.jonas.service.ServiceManager.getWebServicesService(), and org.objectweb.jonas.ear.EarServiceImpl.PARSINGWITHVALIDATION.

Here is the call graph for this function:

void org.objectweb.jonas.ear.EarServiceImpl.doStart  )  throws ServiceException [protected]
 

Start the EAR service.

Exceptions:
ServiceException if the startup failed.

Definition at line 1160 of file EarServiceImpl.java.

References org.objectweb.jonas.ear.EarServiceImpl.deployEar(), and org.objectweb.jonas.ear.EarServiceImpl.WORK_APPS_DIR.

Here is the call graph for this function:

void org.objectweb.jonas.ear.EarServiceImpl.doStop  )  throws ServiceException [protected]
 

Stop the EAR service.

Exceptions:
ServiceException if the stop failed.

Definition at line 374 of file EarServiceImpl.java.

References org.objectweb.jonas.ear.EarServiceImpl.unDeployEar().

Here is the call graph for this function:

String org.objectweb.jonas.ear.EarServiceImpl.getAppsDirectory  ) 
 

Return the Apps directory.

Returns:
The Apps directory

Implements org.objectweb.jonas.ear.EarService.

Definition at line 1634 of file EarServiceImpl.java.

References org.objectweb.jonas.ear.EarServiceImpl.APPS_DIR.

List org.objectweb.jonas.ear.EarServiceImpl.getAutoloadDirectories  ) 
 

Return the list of "autoload" directories for applications.

Returns:
The list of all "autoload" directories

Implements org.objectweb.jonas.ear.EarServiceImplMBean.

Definition at line 1616 of file EarServiceImpl.java.

Integer org.objectweb.jonas.ear.EarServiceImpl.getCurrentNumberOfEars  ) 
 

Returns:
current number of ears deployed in the JOnAS server

Implements org.objectweb.jonas.ear.EarServiceImplMBean.

Definition at line 1405 of file EarServiceImpl.java.

List org.objectweb.jonas.ear.EarServiceImpl.getDeployableEars  )  throws Exception
 

Return the list of installed Applications ready to deploy.

Returns:
The list of deployable Applications
Exceptions:
Exception if the list can't be built

Implements org.objectweb.jonas.ear.EarServiceImplMBean.

Definition at line 1606 of file EarServiceImpl.java.

References org.objectweb.jonas.ear.EarServiceImpl.getDeployedEars(), and org.objectweb.jonas.ear.EarServiceImpl.getInstalledEars().

Here is the call graph for this function:

List org.objectweb.jonas.ear.EarServiceImpl.getDeployedEars  ) 
 

Return the list of all loaded Applications.

Returns:
The list of deployed Applications

Implements org.objectweb.jonas.ear.EarServiceImplMBean.

Definition at line 1589 of file EarServiceImpl.java.

References org.objectweb.jonas.ear.Ear.getEarUrl().

Referenced by org.objectweb.jonas.ear.EarServiceImpl.getDeployableEars().

Here is the call graph for this function:

Set org.objectweb.jonas.ear.EarServiceImpl.getEarNames  ) 
 

This method is added temporarily. It will disapear when Ears will have their associated MBeans (when Ears will become manageable)

Returns:
the names of the ears currently deployed in the JOnAS server

Implements org.objectweb.jonas.ear.EarServiceImplMBean.

Definition at line 1436 of file EarServiceImpl.java.

List org.objectweb.jonas.ear.EarServiceImpl.getInstalledEars  )  throws Exception
 

Return the list of installed Applications. The EAR files or the directories with expanded Applications are searched in JONAS_BASE/apps and all Applications directories 'autoload'.

Returns:
The list of EAR files or the directories with expanded Applications found
Exceptions:
Exception if the list can't be retrieved

Implements org.objectweb.jonas.ear.EarServiceImplMBean.

Definition at line 1417 of file EarServiceImpl.java.

References org.objectweb.jonas.ear.EarServiceImpl.APPS_DIR.

Referenced by org.objectweb.jonas.ear.EarServiceImpl.getDeployableEars().

Boolean org.objectweb.jonas.ear.EarServiceImpl.isEarDeployed String  fileName  ) 
 

Test if the specified filename is already deployed or not. This method is defined in the EarService interface.

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

Implements org.objectweb.jonas.ear.EarService.

Definition at line 1554 of file EarServiceImpl.java.

References org.objectweb.jonas.ear.EarServiceImpl.isEarLoaded().

Here is the call graph for this function:

boolean org.objectweb.jonas.ear.EarServiceImpl.isEarDeployedByUnpackName 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.

Implements org.objectweb.jonas.ear.EarService.

Definition at line 1564 of file EarServiceImpl.java.

References org.objectweb.jonas.ear.Ear.getName(), and org.objectweb.jonas.ear.Ear.getUnpackName().

Here is the call graph for this function:

boolean org.objectweb.jonas.ear.EarServiceImpl.isEarLoaded String  fileName  ) 
 

Test if the specified filename is already deployed or not. This method is a management method provided by the EarServerice MBean.

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

Implements org.objectweb.jonas.ear.EarServiceImplMBean.

Definition at line 1513 of file EarServiceImpl.java.

References org.objectweb.jonas.ear.EarServiceImpl.APPS_DIR.

Referenced by org.objectweb.jonas.ear.EarServiceImpl.isEarDeployed().

void org.objectweb.jonas.ear.EarServiceImpl.unDeployEar String  fileName  )  throws Exception
 

Undeploy an EAR by delegating the operation to the unDeployEar() method. This is used for JMX management.

Parameters:
fileName the fileName of the ear which must be be undeployed.
Exceptions:
Exception if the undeployment of the EAR failed.
See also:
org.objectweb.jonas.ear.EarService.unDeployEar(java.lang.String)

Implements org.objectweb.jonas.ear.EarService.

Definition at line 1319 of file EarServiceImpl.java.

References org.objectweb.jonas.ear.EarServiceImpl.unDeployEarMBean().

Here is the call graph for this function:

void org.objectweb.jonas.ear.EarServiceImpl.unDeployEar Context  ctx  )  throws EarServiceException
 

Undeploy an EAR by sending the request to the EJB container and to the WEB container and the Resource service.

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

Implements org.objectweb.jonas.ear.EarService.

Definition at line 1239 of file EarServiceImpl.java.

References org.objectweb.jonas.ear.Ear.getEjbJars(), org.objectweb.jonas.ear.Ear.getRars(), and org.objectweb.jonas.ear.Ear.getWars().

Referenced by org.objectweb.jonas.ear.EarServiceImpl.doStop(), and org.objectweb.jonas.ear.EarServiceImpl.unDeployEarMBean().

Here is the call graph for this function:

void org.objectweb.jonas.ear.EarServiceImpl.unDeployEarMBean String  fileName  )  throws Exception
 

Undeploy an EAR by delegating the operation to the unDeployEar() method. This is used for JMX management.

Parameters:
fileName the fileName of the ear which must be be undeployed.
Exceptions:
Exception if the undeployment of the EAR failed.

Implements org.objectweb.jonas.ear.EarServiceImplMBean.

Definition at line 1329 of file EarServiceImpl.java.

References org.objectweb.jonas.ear.EarServiceImpl.APPS_DIR, and org.objectweb.jonas.ear.EarServiceImpl.unDeployEar().

Referenced by org.objectweb.jonas.ear.EarServiceImpl.unDeployEar().

Here is the call graph for this function:


Member Data Documentation

final String org.objectweb.jonas.ear.EarServiceImpl.APPS_DIR = JONAS_BASE + File.separator + "apps" [static, protected]
 

The name of the apps directory.

Definition at line 129 of file EarServiceImpl.java.

Referenced by org.objectweb.jonas.ear.EarServiceImpl.deployEar(), org.objectweb.jonas.ear.EarServiceImpl.doInit(), org.objectweb.jonas.ear.EarServiceImpl.getAppsDirectory(), org.objectweb.jonas.ear.EarServiceImpl.getInstalledEars(), org.objectweb.jonas.ear.EarServiceImpl.isEarLoaded(), and org.objectweb.jonas.ear.EarServiceImpl.unDeployEarMBean().

final String org.objectweb.jonas.ear.EarServiceImpl.AUTOLOADDIR = "jonas.service.ear.autoloaddir" [static, protected]
 

Directories property for autoload

Definition at line 149 of file EarServiceImpl.java.

Referenced by org.objectweb.jonas.ear.EarServiceImpl.doInit().

final String org.objectweb.jonas.ear.EarServiceImpl.CLASS = "jonas.service.ear.class" [static, protected]
 

Property for the class of the EAR service

Definition at line 159 of file EarServiceImpl.java.

final String org.objectweb.jonas.ear.EarServiceImpl.DESCRIPTORS = "jonas.service.ear.descriptors" [static, protected]
 

Property for ear to deploy at runtime

Definition at line 144 of file EarServiceImpl.java.

Referenced by org.objectweb.jonas.ear.EarServiceImpl.doInit().

final String org.objectweb.jonas.ear.EarServiceImpl.JONAS_BASE = JProp.getJonasBase() [static, protected]
 

The name of the JONAS_BASE directory.

Definition at line 124 of file EarServiceImpl.java.

final String org.objectweb.jonas.ear.EarServiceImpl.PARSINGWITHVALIDATION = "jonas.service.ear.parsingwithvalidation" [static, protected]
 

Property for parsing with validation or not

Definition at line 154 of file EarServiceImpl.java.

Referenced by org.objectweb.jonas.ear.EarServiceImpl.doInit().

final String org.objectweb.jonas.ear.EarServiceImpl.WORK_APPS_DIR = WORK_DIR + File.separator + "apps" [static, protected]
 

The name of the working apps directory.

Definition at line 139 of file EarServiceImpl.java.

Referenced by org.objectweb.jonas.ear.EarServiceImpl.deployEar(), and org.objectweb.jonas.ear.EarServiceImpl.doStart().

final String org.objectweb.jonas.ear.EarServiceImpl.WORK_DIR = JProp.getWorkDir() [static, protected]
 

The name of the working directory.

Definition at line 134 of file EarServiceImpl.java.


The documentation for this class was generated from the following file:
Generated on Tue Feb 15 15:06:55 2005 for JOnAS by  doxygen 1.3.9.1