|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.management.NotificationBroadcasterSupport
org.objectweb.jonas.management.reconfig.emitter.ReconfigEmitter
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 String |
AUTO_GENIC
Auto-GenIC is enabled or disabled ? |
static String |
AUTO_GENIC_ARGS
Arguments for the Auto-GenIC |
static String |
AUTOLOADDIR
autoloaddir property |
static String |
BMP
BeanManaged Management properties |
static String |
CLASS
EJB service class |
static String |
CMP
ContainerManaged Management properties |
static String |
DESCRIPTORS
descriptors property |
protected static String |
EJBJARS_DIR
The name of the directory containing the ejb-jar files. |
protected static String |
JONAS_BASE
The name of the JONAS_BASE directory. |
static String |
JONAS_EJB
base for properties |
static String |
PARSINGWITHVALIDATION
parsing with validation property |
Fields inherited from class org.objectweb.jonas.management.reconfig.emitter.ReconfigEmitter |
---|
RECONFIG_TYPE, SAVE_RECONFIG_TYPE |
Constructor Summary | |
---|---|
EJBServiceImpl()
|
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 file)
Create an ejb container for the EJBs contained in a .jar (or .xml) file. |
void |
deployJars(Context ctx)
Deploy the given ejb-jars of an ear file with the specified parent classloader (ear classloader). |
void |
doInit(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. |
List |
getAutoloadDirectories()
Return the list of "autoload" directories for EJB containers. |
Container |
getContainer(String fileName)
Get the Container by its file name (.xml or .jar) |
String |
getContainerContextID(String containerFileName)
Returns the ContextID associated to this container filename. |
Integer |
getCurrentNumberOfContainer()
MBean method |
Set |
getDataSourceDependence(String dsName)
MBean method |
List |
getDeployableJars()
Return the list of installed EJB container ready to deploy. |
List |
getDeployedJars()
Return the list of all loaded EJB container. |
List |
getInstalledJars()
Return the list of installed EJB containers. |
String |
getJarsDirectory()
Return the Ejbjars directory. |
Set |
getJmsConnectionFactoryDependence(String cfName)
Management method |
Set |
getJmsDestinationDependence(String destName)
Manangement method |
Set |
getMailFactoryDependence(String mfName)
Management method |
Timer |
getTimer(JTimerHandleInfo info)
Get a new Timer . |
Integer |
getTotalCurrentNumberOfBeanType()
MBean method |
Integer |
getTotalCurrentNumberOfBMPType()
MBean method |
Integer |
getTotalCurrentNumberOfCMPType()
MBean method |
Integer |
getTotalCurrentNumberOfMDBType()
MBean method |
Integer |
getTotalCurrentNumberOfSBFType()
MBean method |
Integer |
getTotalCurrentNumberOfSBLType()
MBean method |
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). |
boolean |
isJarLoaded(String fileName)
Test if the specified filename is already deployed or not |
Container[] |
listContainers()
List JOnAS container created by EJB Service |
void |
removeCache(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(String fileName)
Remove EJB container corresponding to a .JAR file. |
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. |
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.reconfig.emitter.ReconfigEmitter |
---|
initLogger, sendReconfigNotification, sendSaveNotification |
Methods inherited from class javax.management.NotificationBroadcasterSupport |
---|
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, 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 String AUTO_GENIC
public static final String AUTO_GENIC_ARGS
protected static final String JONAS_BASE
protected static final String EJBJARS_DIR
public static final String JONAS_EJB
public static final String AUTOLOADDIR
public static final String PARSINGWITHVALIDATION
public static final String DESCRIPTORS
public static final String CLASS
public static final String BMP
public static final String CMP
Constructor Detail |
---|
public EJBServiceImpl()
Method Detail |
---|
public void doInit(Context ctx) throws ServiceException
doInit
in class AbsServiceImpl
ctx
- EJB service initialization context
ServiceException
- Problem with EJB service initializationpublic void doStart() throws ServiceException
doStart
in class AbsServiceImpl
ServiceException
- service start-up failedpublic void doStop()
doStop
in class AbsServiceImpl
public String createContainer(Context ctx) throws Exception
createContainer
in interface EJBService
ctx
- JNDI context in which is found the container configuration.
Exception
- if an error occur during the creation of the container.public Container getContainer(String fileName)
fileName
- given file name on which
public void removeContainer(Container cont)
public Container[] listContainers()
public void syncAllEntities(boolean passivate)
syncAllEntities
in interface EJBService
syncAllEntities
in interface EJBServiceImplMBean
passivate
- passivate instances after synchronization.public Integer getCurrentNumberOfContainer()
getCurrentNumberOfContainer
in interface EJBServiceImplMBean
public Integer getTotalCurrentNumberOfBeanType()
getTotalCurrentNumberOfBeanType
in interface EJBServiceImplMBean
public Integer getTotalCurrentNumberOfBMPType()
getTotalCurrentNumberOfBMPType
in interface EJBServiceImplMBean
public Integer getTotalCurrentNumberOfCMPType()
getTotalCurrentNumberOfCMPType
in interface EJBServiceImplMBean
public Integer getTotalCurrentNumberOfSBFType()
getTotalCurrentNumberOfSBFType
in interface EJBServiceImplMBean
public Integer getTotalCurrentNumberOfSBLType()
getTotalCurrentNumberOfSBLType
in interface EJBServiceImplMBean
public Integer getTotalCurrentNumberOfMDBType()
getTotalCurrentNumberOfMDBType
in interface EJBServiceImplMBean
public void removeContainer(String fileName) throws Exception
removeContainer
in interface EJBService
fileName
- name of the file containing the JAR module
Exception
- when the EjbJar cannot be undeployed.public String createContainer(String file) throws Exception
createContainer
in interface EJBService
file
- Name of the file to be deployed
Exception
- when the EjbJar cannot be deployed.public Boolean isJarDeployed(String fileName)
isJarDeployed
in interface EJBService
fileName
- the name of the jar file
public boolean isJarDeployedByWorkName(String workFileName)
isJarDeployedByWorkName
in interface EJBService
workFileName
- the internal name of the jar file (working copy)
public Set getDataSourceDependence(String dsName)
getDataSourceDependence
in interface EJBServiceImplMBean
public Set getJmsDestinationDependence(String destName)
getJmsDestinationDependence
in interface EJBServiceImplMBean
public Set getJmsConnectionFactoryDependence(String cfName)
getJmsConnectionFactoryDependence
in interface EJBServiceImplMBean
public Set getMailFactoryDependence(String mfName)
getMailFactoryDependence
in interface EJBServiceImplMBean
public List getInstalledJars() throws Exception
getInstalledJars
in interface EJBServiceImplMBean
Exception
- if the list can't be retrievedpublic void deployJars(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(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(ClassLoader earClassLoader)
removeCache
in interface EJBService
earClassLoader
- the ClassLoader of the ear application to remove
from the cache.public boolean isJarLoaded(String fileName)
isJarLoaded
in interface EJBServiceImplMBean
fileName
- the name of the jar file.
public List getDeployedJars()
getDeployedJars
in interface EJBServiceImplMBean
public List getDeployableJars() throws Exception
getDeployableJars
in interface EJBServiceImplMBean
Exception
- when cannot get installed jars listpublic List getAutoloadDirectories()
public String getJarsDirectory()
getJarsDirectory
in interface EJBServiceImplMBean
public void checkGenIC(String fileName, URL[] urls)
checkGenIC
in interface EJBService
fileName
- given EJB-JAR file.urls
- Array of URLs used as CLASSPATH during EJB compilationpublic String getContainerContextID(String containerFileName)
EARService
for security purpose.
getContainerContextID
in interface EJBService
containerFileName
- container filename
public Timer getTimer(JTimerHandleInfo info)
Timer
.
getTimer
in interface EJBService
info
- JTimerHandleInfo
instance used for Timer
creation.
Timer
public Timer restartTimer(JTimerHandleInfo info)
Timer
given some input infos.
restartTimer
in interface EJBService
info
- JTimerHandleInfo
instance used for Timer
restart.
Timer
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |