Implementation of the EJB Container Service for jonas. This class works only
with jonas_ejb classes.
author: Philippe Coq author: Jeff Mesnil (Security) author: Markus Karg (Novell port) author: Christophe Ney (for making easier Enhydra integration) author: Adriana Danes (complete management methods) author: Florent Benoit & Ludovic Bert (Ear service, deployJars, undeployJars) author: Benjamin Bonnet (max thread pool size) author: Michel-Ange Anton (JSR77 MBean : EJBModule) author: Adriana Danes (JSR77)
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.
createContainer(Context ctx) Create a JOnAS Container for all the beans that are described in a .xml
file, or belong to .jar file.
The ObjectName of the MBean associated to the container (i.e.
isJarDeployed(String fileName) Test if the specified file is already deployed (if a container is created
for this jar).
public 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).
public boolean
isJarLoaded(String fileName) Test if the specified filename is already deployed or not
Parameters: fileName - the name of the jar file.
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. Parameters: urls - Array of URLs used as CLASSPATH during EJB compilation
Create a JOnAS Container for all the beans that are described in a .xml
file, or belong to .jar file.
The ObjectName of the MBean associated to the container (i.e. tothe deployed module) throws: Exception - if an error occur during the creation of the container.
MBean method allowing to create an EJB container for the EJBs contained
in a .jar (or .xml) file.
Parameters: file - Name of the file to be deployed The ObjectName of the MBean associated to the container (to thedeployed module)
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 theejbjars. This context contains the following parameters : - earRootUrl the root of the ear application. - earURLfilename of the EAR. - earClassLoader the ear classLoader ofthe ear application. - ejbClassLoader the ejb classLoader forthe ejbjars. - jarURLs the list of the urls of the ejb-jarsto deploy. - roleNames the role names of the security-role.
throws: ServiceException - if an error occurs during the deployment.
This method is used by the getXXXDependence MBean methods. It gathers the
ObjectNames of the EJBs using a given resource.
Parameters: name - the resource name the ObjectNames of all the ejb using this resource
Return the list of installed EJB container ready to deploy.
The list of deployable EJB container throws: Exception - when cannot get installed jars list
Return the list of installed EJB containers. The JAR files or the
directories with expanded EJB container are searched in
JONAS_BASE/ejbjars and all ejbjar directories 'autoload'.
The list of JAR files or the directories with expanded EJBcontainer found throws: Exception - if the list can't be retrieved
Test if the specified file is already deployed (if a container is created
for this jar).
Parameters: fileName - the name of the jar file true if the jar was deployed, false otherwise
isJarDeployedByWorkName
public boolean isJarDeployedByWorkName(String workFileName)(Code)
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) true if the jar was deployed, false otherwise
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 removefrom the cache.
public void removeContainer(Container cont, boolean isEarCase)(Code)
Remove the specified container.
Parameters: cont - the container to remove. Parameters: isEarCase - true if only if the removeContainer method is called inthe ear case, false otherwise.
Undeploy the given ejb-jars of an ear file. (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 undeploy.
Methods inherited from org.objectweb.jonas.service.AbsServiceImpl