org.objectweb.jonas.container
Interface EJBService

All Superinterfaces:
Service
All Known Implementing Classes:
EJBServiceImpl

public interface EJBService
extends Service

EJB Service interface.


Method Summary
 Container createContainer(javax.naming.Context ctx)
          Create a JOnAS Container for all beans that are described in a .xml file or belong to .jar file.
 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)
          Get the Container by its file name (.xml or .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 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

public Container createContainer(javax.naming.Context ctx)
                          throws java.lang.Exception
Create a JOnAS Container for all beans that are described in a .xml file or belong to .jar file.
Parameters:
ctx - JNDI contect in which are found the container configuration.

getContainer

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

removeContainer

public void removeContainer(Container cont)
Remove a JOnAS Container.
Parameters:
cont - JOnAS container to remove.

listContainers

public Container[] listContainers()
List of all JOnAS Containers
Returns:
an array of Container objects

syncAllEntities

public void syncAllEntities(boolean passivate)
Synchronized all entity bean containers
Parameters:
passivate - passivate instances after synchronization.

deployJars

public 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.
Returns:
ClassLoader the ejbClassLoader created.
Throws:
ServiceException - if an error occurs during the deployment.

unDeployJars

public 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

public 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.