org.objectweb.jonas.container
Interface EJBService

All Superinterfaces:
Service
All Known Implementing Classes:
EJBServiceImpl

public interface EJBService
extends Service

EJB Service interface.


Method Summary
 void checkGenIC(java.lang.String fileName, java.net.URL[] urls)
          Check that GenIC have been applied on the given ejb-jar file If it was not done, it run GenIC against the file.
 java.lang.String createContainer(javax.naming.Context ctx)
          Create a JOnAS Container for all the beans that are described in a .xml file, or belong to .jar file.
 java.lang.String createContainer(java.lang.String fileName)
           
 void deployJars(javax.naming.Context ctx)
          Deploy the given ejb-jars of an ear file with the specified parent classloader (ear classloader).
 Container getContainer(java.lang.String fileName)
           
 java.lang.String getEjbjarsDirectory()
          Return the Ejbjars directory.
 JWorkManager getWorkManager()
          Get the workManager
 java.lang.Boolean isJarDeployed(java.lang.String fileName)
          Test if the specified file is already deployed (if a container is created for this jar).
 boolean isJarDeployedByWorkName(java.lang.String workFileName)
          Test if the specified jar identified with its work name is already deployed (if a container is created for this jar).
 Container[] listContainers()
          List of all JOnAS Containers
 void removeCache(java.lang.ClassLoader earClassLoader)
          Make a cleanup of the cache of deployment descriptor.
 void removeContainer(Container cont)
          Remove a JOnAS Container.
 void removeContainer(java.lang.String fileName)
           
 void syncAllEntities(boolean passivate)
          Synchronized all entity bean containers
 void unDeployJars(java.net.URL[] urls)
          Undeploy the given ejb-jars of an ear file with the specified parent classloader (ear classloader).
 
Methods inherited from interface org.objectweb.jonas.service.Service
getName, init, isStarted, setName, start, stop
 

Method Detail

createContainer

java.lang.String createContainer(javax.naming.Context ctx)
                                 throws java.lang.Exception
Create a JOnAS Container for all the beans that are described in a .xml file, or belong to .jar file.

Parameters:
ctx - JNDI context in which is found the container configuration.
Returns:
The ObjectName of the MBean associated to the container (i.e. to the deployed module)
Throws:
java.lang.Exception

createContainer

java.lang.String createContainer(java.lang.String fileName)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

isJarDeployed

java.lang.Boolean isJarDeployed(java.lang.String fileName)
Test if the specified file is already deployed (if a container is created for this jar).

Parameters:
fileName - the name of the jar file
Returns:
true if the jar was deployed, false otherwise

isJarDeployedByWorkName

boolean isJarDeployedByWorkName(java.lang.String workFileName)
Test if the specified jar identified with its work name is already deployed (if a container is created for this jar).

Parameters:
workFileName - the internal name of the jar file (working copy)
Returns:
true if the jar was deployed, false otherwise

getContainer

Container getContainer(java.lang.String fileName)
Returns:
the Container by its file name (.xml or .jar)

removeContainer

void removeContainer(Container cont)
Remove a JOnAS Container.

Parameters:
cont - JOnAS container to remove.

removeContainer

void removeContainer(java.lang.String fileName)
                     throws java.lang.Exception
Throws:
java.lang.Exception

listContainers

Container[] listContainers()
List of all JOnAS Containers

Returns:
an array of Container objects

syncAllEntities

void syncAllEntities(boolean passivate)
Synchronized all entity bean containers

Parameters:
passivate - passivate instances after synchronization.

deployJars

void deployJars(javax.naming.Context ctx)
                throws ServiceException
Deploy the given ejb-jars of an ear file with the specified parent classloader (ear classloader). (This method is only used for the ear applications, not for the ejb-jar applications).

Parameters:
ctx - the context containing the configuration to deploy the ejbjars.
This context contains the following parameters :
- earRootUrl the root of the ear application.
- earClassLoader the ear classLoader of the ear application.
- ejbClassLoader the ejb classLoader for the ejbjars.
- jarURLs the list of the urls of the ejb-jars to deploy.
- roleNames the role names of the security-role.
Throws:
ServiceException - if an error occurs during the deployment.

unDeployJars

void unDeployJars(java.net.URL[] urls)
Undeploy the given ejb-jars of an ear file with the specified parent classloader (ear classloader). (This method is only used for the ear applications, not for the ejb-jar applications).

Parameters:
urls - the list of the urls of the ejb-jars to deploy.

removeCache

void removeCache(java.lang.ClassLoader earClassLoader)
Make a cleanup of the cache of deployment descriptor. This method must be invoked after the ear deployment by the EAR service. the deployment of an ear by .

Parameters:
earClassLoader - the ClassLoader of the ear application to remove from the cache.

getEjbjarsDirectory

java.lang.String getEjbjarsDirectory()
Return the Ejbjars directory.

Returns:
The Ejbjars directory

checkGenIC

void checkGenIC(java.lang.String fileName,
                java.net.URL[] urls)
Check that GenIC have been applied on the given ejb-jar file If it was not done, it run GenIC against the file.

Parameters:
fileName - given EJB-JAR file.
urls - Array of URLs used as CLASSPATH during EJB compilation

getWorkManager

JWorkManager getWorkManager()
Get the workManager