org.objectweb.jonas.ear
Interface EarServiceImplMBean

All Known Implementing Classes:
EarServiceImpl

public interface EarServiceImplMBean

JOnAS EAR Service MBean interface. This interface provides a description for the EAR service management.

Author:
Florent Benoit, Ludovic Bert

Method Summary
 java.lang.String deployEarMBean(java.lang.String fileName)
          Deploy an EAR, used by the JMX Management.
 java.lang.String getAppsDirectory()
          Return the Apps directory.
 java.util.List getAutoloadDirectories()
          Return the list of "autoload" directories for web applications.
 java.lang.Integer getCurrentNumberOfEars()
           
 java.util.List getDeployableEars()
          Return the list of installed Applications ready to deploy.
 java.util.List getDeployedEars()
          Return the list of all loaded Applications.
 java.util.Set getEarNames()
          This method is added temporarily.
 java.util.List getInstalledEars()
          Return the list of installed Applications.
 boolean isEarLoaded(java.lang.String fileName)
          Test if the specified filename is already deployed or not
 void unDeployEarMBean(java.lang.String fileName)
          Undeploy an EAR, used by the JMX Management.
 

Method Detail

deployEarMBean

public java.lang.String deployEarMBean(java.lang.String fileName)
                                throws java.lang.Exception
Deploy an EAR, used by the JMX Management.

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.

unDeployEarMBean

public void unDeployEarMBean(java.lang.String fileName)
                      throws java.lang.Exception
Undeploy an EAR, used by the JMX Management.

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

getCurrentNumberOfEars

public java.lang.Integer getCurrentNumberOfEars()
Returns:
current number of ears deployed in the JOnAS server

getInstalledEars

public java.util.List getInstalledEars()
                                throws java.lang.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
Throws:
java.lang.Exception - if the list can't be retrieved

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)

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

isEarLoaded

public boolean isEarLoaded(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.

getDeployedEars

public java.util.List getDeployedEars()
Return the list of all loaded Applications.

Returns:
The list of deployed Applications

getDeployableEars

public java.util.List getDeployableEars()
                                 throws java.lang.Exception
Return the list of installed Applications ready to deploy.

Returns:
The list of deployable Applications
Throws:
java.lang.Exception - if the list of deployable ears can't be returned

getAutoloadDirectories

public java.util.List getAutoloadDirectories()
Return the list of "autoload" directories for web applications.

Returns:
The list of all "autoload" directories

getAppsDirectory

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

Returns:
The Apps directory