|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.management.NotificationBroadcasterSupport org.objectweb.jonas.management.ReconfigDispatcher org.objectweb.jonas.service.AbsServiceImpl org.objectweb.jonas.container.EJBServiceImpl
public class EJBServiceImpl
Implementation of the EJB Container Service for jonas. This class works only with jonas_ejb classes.
Field Summary | |
---|---|
static java.lang.String |
AUTO_GENIC
Auto-GenIC is enabled or disabled ? |
static java.lang.String |
AUTO_GENIC_ARGS
Arguments for the Auto-GenIC |
static java.lang.String |
AUTOLOADDIR
autoloaddir property |
static java.lang.String |
BMP
BeanManaged Management properties |
static java.lang.String |
CLASS
EJB service class |
static java.lang.String |
CMP
ContainerManaged Management properties |
static java.lang.String |
DESCRIPTORS
descriptors property |
protected static java.lang.String |
EJBJARS_DIR
The name of the directory containing the ejb-jar files. |
protected static java.lang.String |
JONAS_BASE
The name of the JONAS_BASE directory. |
static java.lang.String |
JONAS_EJB
base for properties |
static java.lang.String |
MAXWORKTHREADS
Max Work Thread property name |
static java.lang.String |
MINWORKTHREADS
Min Work Thread property name |
static java.lang.String |
PARSINGWITHVALIDATION
parsing with validation property |
static java.lang.String |
THREADWAITTIMEOUT
Thread Wait Timeout property name |
Fields inherited from class org.objectweb.jonas.management.ReconfigDispatcher |
---|
RECONFIG_TYPE, SAVE_RECONFIG_TYPE |
Constructor Summary | |
---|---|
EJBServiceImpl()
|
Method Summary | |
---|---|
static java.lang.String |
buildEJBModuleName(java.lang.String pFilename)
Build the EJBModule name. |
static java.lang.String |
buildEJBModuleName(java.net.URL pUrl)
Build the EJBModule name. |
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 file)
|
java.lang.String |
createContainerMBean(java.lang.String file)
MBean method allowing to create an EJB container for the EJBs contained in a .jar (or .xml) file. |
void |
deployJars(javax.naming.Context ctx)
Deploy the given ejb-jars of an ear file with the specified parent classloader (ear classloader). |
void |
doInit(javax.naming.Context ctx)
Init the Service. |
void |
doStart()
Start the Service Initialization of the service is already done. |
void |
doStop()
Stop the service: - Remove all JOnAS Containers. |
java.util.List |
getAutoloadDirectories()
Return the list of "autoload" directories for EJB containers. |
Container |
getContainer(java.lang.String fileName)
Get the Container by its file name (.xml or .jar) |
java.lang.Integer |
getCurrentNumberOfContainer()
MBean method |
java.util.Set |
getDataSourceDependence(java.lang.String dsName)
MBean method |
java.util.List |
getDeployableJars()
Return the list of installed EJB container ready to deploy. |
java.util.List |
getDeployedJars()
Return the list of all loaded EJB container. |
java.lang.String |
getEjbjarsDirectory()
Return the Ejbjars directory. |
java.util.List |
getInstalledJars()
Return the list of installed EJB containers. |
java.util.Set |
getJmsConnectionFactoryDependence(java.lang.String cfName)
Management method |
java.util.Set |
getJmsDestinationDependence(java.lang.String destName)
Manangement method |
java.util.Set |
getMailFactoryDependence(java.lang.String mfName)
Management method |
java.lang.Integer |
getTotalCurrentNumberOfBeanType()
MBean method |
java.lang.Integer |
getTotalCurrentNumberOfBMPType()
MBean method |
java.lang.Integer |
getTotalCurrentNumberOfCMPType()
MBean method |
java.lang.Integer |
getTotalCurrentNumberOfMDBType()
MBean method |
java.lang.Integer |
getTotalCurrentNumberOfSBFType()
MBean method |
java.lang.Integer |
getTotalCurrentNumberOfSBLType()
MBean method |
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). |
boolean |
isJarLoaded(java.lang.String fileName)
Test if the specified filename is already deployed or not |
Container[] |
listContainers()
List JOnAS container created by EJB Service |
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(Container cont,
boolean isEarCase)
Remove the specified container. |
void |
removeContainer(java.lang.String fileName)
|
void |
removeContainerMBean(java.lang.String fileName)
MBean method remove a container application |
void |
syncAllEntities(boolean passivate)
Synchronized all entity bean containers |
void |
unDeployJars(java.net.URL[] urls)
Undeploy the given ejb-jars of an ear file. |
Methods inherited from class org.objectweb.jonas.service.AbsServiceImpl |
---|
getDomainName, getJonasServerName, getName, init, isStarted, setName, start, stop |
Methods inherited from class org.objectweb.jonas.management.ReconfigDispatcher |
---|
addNotificationListener, getFilter, getHandback, getListener, getNotificationInfo, initLogger, removeNotificationListener, sendReconfigNotification, sendSaveNotification |
Methods inherited from class javax.management.NotificationBroadcasterSupport |
---|
handleNotification, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.objectweb.jonas.service.Service |
---|
getName, init, isStarted, setName, start, stop |
Field Detail |
---|
public static final java.lang.String AUTO_GENIC
public static final java.lang.String AUTO_GENIC_ARGS
public static final java.lang.String MINWORKTHREADS
public static final java.lang.String MAXWORKTHREADS
public static final java.lang.String THREADWAITTIMEOUT
protected static final java.lang.String JONAS_BASE
protected static final java.lang.String EJBJARS_DIR
public static final java.lang.String JONAS_EJB
public static final java.lang.String AUTOLOADDIR
public static final java.lang.String PARSINGWITHVALIDATION
public static final java.lang.String DESCRIPTORS
public static final java.lang.String CLASS
public static final java.lang.String BMP
public static final java.lang.String CMP
Constructor Detail |
---|
public EJBServiceImpl()
Method Detail |
---|
public void doInit(javax.naming.Context ctx) throws ServiceException
doInit
in class AbsServiceImpl
ctx
- configuration of the service
ServiceException
- service initialization failedpublic JWorkManager getWorkManager()
EJBService
getWorkManager
in interface EJBService
public void doStart() throws ServiceException
doStart
in class AbsServiceImpl
ServiceException
- service start-up failedpublic void doStop()
doStop
in class AbsServiceImpl
public java.lang.String createContainer(javax.naming.Context ctx) throws java.lang.Exception
createContainer
in interface EJBService
ctx
- JNDI context in which is found the container configuration.
java.lang.Exception
- if an error occur during the creation of the container.public Container getContainer(java.lang.String fileName)
getContainer
in interface EJBService
fileName
- given file name on which
public void removeContainer(Container cont)
removeContainer
in interface EJBService
cont
- JOnAS container to remove.public Container[] listContainers()
listContainers
in interface EJBService
public void syncAllEntities(boolean passivate)
syncAllEntities
in interface EJBService
syncAllEntities
in interface EJBServiceImplMBean
passivate
- passivate instances after synchronization.public java.lang.Integer getCurrentNumberOfContainer()
getCurrentNumberOfContainer
in interface EJBServiceImplMBean
public java.lang.Integer getTotalCurrentNumberOfBeanType()
getTotalCurrentNumberOfBeanType
in interface EJBServiceImplMBean
public java.lang.Integer getTotalCurrentNumberOfBMPType()
getTotalCurrentNumberOfBMPType
in interface EJBServiceImplMBean
public java.lang.Integer getTotalCurrentNumberOfCMPType()
getTotalCurrentNumberOfCMPType
in interface EJBServiceImplMBean
public java.lang.Integer getTotalCurrentNumberOfSBFType()
getTotalCurrentNumberOfSBFType
in interface EJBServiceImplMBean
public java.lang.Integer getTotalCurrentNumberOfSBLType()
getTotalCurrentNumberOfSBLType
in interface EJBServiceImplMBean
public java.lang.Integer getTotalCurrentNumberOfMDBType()
getTotalCurrentNumberOfMDBType
in interface EJBServiceImplMBean
public void removeContainer(java.lang.String fileName) throws java.lang.Exception
removeContainer
in interface EJBService
java.lang.Exception
public void removeContainerMBean(java.lang.String fileName) throws java.lang.Exception
removeContainerMBean
in interface EJBServiceImplMBean
fileName
- the Name of this container
java.lang.Exception
public java.lang.String createContainer(java.lang.String file) throws java.lang.Exception
createContainer
in interface EJBService
java.lang.Exception
public java.lang.String createContainerMBean(java.lang.String file) throws java.lang.Exception
createContainerMBean
in interface EJBServiceImplMBean
file
- Name of the file to be deployed
java.lang.Exception
public java.lang.Boolean isJarDeployed(java.lang.String fileName)
isJarDeployed
in interface EJBService
fileName
- the name of the jar file
public boolean isJarDeployedByWorkName(java.lang.String workFileName)
isJarDeployedByWorkName
in interface EJBService
workFileName
- the internal name of the jar file (working copy)
public java.util.Set getDataSourceDependence(java.lang.String dsName)
getDataSourceDependence
in interface EJBServiceImplMBean
public java.util.Set getJmsDestinationDependence(java.lang.String destName)
getJmsDestinationDependence
in interface EJBServiceImplMBean
public java.util.Set getJmsConnectionFactoryDependence(java.lang.String cfName)
getJmsConnectionFactoryDependence
in interface EJBServiceImplMBean
public java.util.Set getMailFactoryDependence(java.lang.String mfName)
getMailFactoryDependence
in interface EJBServiceImplMBean
public java.util.List getInstalledJars() throws java.lang.Exception
getInstalledJars
in interface EJBServiceImplMBean
java.lang.Exception
- if the list can't be retrievedpublic void deployJars(javax.naming.Context ctx) throws ServiceException
deployJars
in interface EJBService
ctx
- the context containing the configuration to deploy the
ejbjars. ServiceException
- if an error occurs during the deployment.public void unDeployJars(java.net.URL[] urls)
unDeployJars
in interface EJBService
urls
- the list of the urls of the ejb-jars to undeploy.public void removeContainer(Container cont, boolean isEarCase)
cont
- the container to remove.isEarCase
- true if only if the removeContainer method is called in
the ear case, false otherwise.public void removeCache(java.lang.ClassLoader earClassLoader)
removeCache
in interface EJBService
earClassLoader
- the ClassLoader of the ear application to remove
from the cache.public boolean isJarLoaded(java.lang.String fileName)
isJarLoaded
in interface EJBServiceImplMBean
fileName
- the name of the jar file.
public java.util.List getDeployedJars()
getDeployedJars
in interface EJBServiceImplMBean
public java.util.List getDeployableJars() throws java.lang.Exception
getDeployableJars
in interface EJBServiceImplMBean
java.lang.Exception
- when cannot get installed jars listpublic java.util.List getAutoloadDirectories()
getAutoloadDirectories
in interface EJBServiceImplMBean
public java.lang.String getEjbjarsDirectory()
getEjbjarsDirectory
in interface EJBService
getEjbjarsDirectory
in interface EJBServiceImplMBean
public static java.lang.String buildEJBModuleName(java.net.URL pUrl)
pUrl
- The URL of Jar file
public static java.lang.String buildEJBModuleName(java.lang.String pFilename)
pFilename
- The name of Jar file
public void checkGenIC(java.lang.String fileName, java.net.URL[] urls)
checkGenIC
in interface EJBService
fileName
- given EJB-JAR file.urls
- Array of URLs used as CLASSPATH during EJB compilation
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |