org.ow2.jonas.ejb2
Interface EJBService

All Superinterfaces:
Service
All Known Implementing Classes:
JOnASEJBService

public interface EJBService
extends Service

EJB Service interface.


Method Summary
 void checkGenIC(String fileName, 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.
 String createContainer(Context ctx)
          Create a JOnAS Container for all the beans that are described in a .xml file, or belong to .jar file.
 String createContainer(String fileName)
          Create a JOnAS Container for all the beans that are described in a .xml file, or belong to .jar file.
 void deployJars(Context ctx)
          Deploy the given ejb-jars of an ear file with the specified parent classloader (ear classloader).
 String getContainerContextID(String containerFileName)
          Returns the ContextID associated to this container filename.
 Timer getTimer(JTimerHandleInfo info)
          Get a new Timer.
 Boolean isJarDeployed(String fileName)
          Test if the specified file is already deployed (if a container is created for this jar).
 boolean isJarDeployedByWorkName(String workFileName)
          Test if the specified jar identified with its work name is already deployed (if a container is created for this jar).
 void removeCache(ClassLoader earClassLoader)
          Make a cleanup of the cache of deployment descriptor.
 void removeContainer(String fileName)
          Removes a JOnAS Container.
 Timer restartTimer(JTimerHandleInfo info)
          Restart a Timer given some input infos.
 void syncAllEntities(boolean passivate)
          Synchronized all entity bean containers.
 void unDeployJars(URL[] urls)
          Undeploy the given ejb-jars of an ear file with the specified parent classloader (ear classloader).
 
Methods inherited from interface org.ow2.jonas.service.Service
getName, init, isStarted, setName, start, stop
 

Method Detail

createContainer

String createContainer(Context ctx)
                       throws 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:
Exception - if Container creation was unable to complete.

createContainer

String createContainer(String fileName)
                       throws Exception
Create a JOnAS Container for all the beans that are described in a .xml file, or belong to .jar file.

Parameters:
fileName - EjbJar filename.
Returns:
The ObjectName of the MBean associated to the container (i.e. to the deployed module)
Throws:
Exception - when the EjbJar cannot be deployed.

isJarDeployed

Boolean isJarDeployed(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 TODO redundant with EJBServiceMBean.isJarLoaded() Used in J2EEServer, J2EESERMBean (mbeans-descriptors.xml)

isJarDeployedByWorkName

boolean isJarDeployedByWorkName(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

removeContainer

void removeContainer(String fileName)
                     throws Exception
Removes a JOnAS Container.

Parameters:
fileName - JOnAS container to remove.
Throws:
Exception - when the EjbJar cannot be undeployed.

syncAllEntities

void syncAllEntities(boolean passivate)
Synchronized all entity bean containers.

Parameters:
passivate - passivate instances after synchronization.

deployJars

void deployJars(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(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(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.

checkGenIC

void checkGenIC(String fileName,
                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

getContainerContextID

String getContainerContextID(String containerFileName)
Returns the ContextID associated to this container filename. Used by the EARService for security purpose.

Parameters:
containerFileName - container filename
Returns:
Returns the ContextID associated to this container filename.

getTimer

Timer getTimer(JTimerHandleInfo info)
Get a new Timer.

Parameters:
info - JTimerHandleInfo instance used for Timer creation.
Returns:
a newly created Timer

restartTimer

Timer restartTimer(JTimerHandleInfo info)
Restart a Timer given some input infos.

Parameters:
info - JTimerHandleInfo instance used for Timer restart.
Returns:
a newly restarted Timer.


Copyright © 2010 OW2 Consortium. All Rights Reserved.