|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.management.NotificationBroadcasterSupport
org.ow2.jonas.lib.reconfig.ReconfigEmitter
org.ow2.jonas.lib.service.AbsServiceImpl
org.ow2.jonas.ejb.internal.JOnASEJBService
public class JOnASEJBService
Implementation of the EJB Container Service for jonas. This class works only with jonas_ejb classes.
| Field Summary | |
|---|---|
static String |
BMP
BeanManaged Management properties. |
static String |
CMP
ContainerManaged Management properties. |
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. |
| Fields inherited from class org.ow2.jonas.lib.reconfig.ReconfigEmitter |
|---|
RECONFIG_TYPE, SAVE_RECONFIG_TYPE |
| Constructor Summary | |
|---|---|
JOnASEJBService()
Default constructor. |
|
| 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. |
void |
checkRequirements()
|
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 |
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. |
org.ow2.jonas.cmi.CmiService |
getCmiService()
|
org.ow2.jonas.lib.ejb21.Container |
getContainer(String fileName)
Get the Container by its file name (.xml or .jar) |
String |
getContainerContextID(String containerFileName)
|
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(org.ow2.jonas.ejb.JTimerHandleInfo info)
|
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 |
org.ow2.jonas.lib.ejb21.Container[] |
listContainers()
List JOnAS container created by EJB Service |
void |
removeCache(ClassLoader earClassLoader)
Make a cleanup of the cache of deployment descriptor. |
void |
removeContainer(org.ow2.jonas.lib.ejb21.Container cont)
Remove a JOnAS container |
void |
removeContainer(org.ow2.jonas.lib.ejb21.Container cont,
boolean isEarCase)
Remove the specified container. |
void |
removeContainer(String fileName)
Remove EJB container corresponding to a .JAR file. |
Timer |
restartTimer(org.ow2.jonas.ejb.JTimerHandleInfo info)
|
void |
setAutoGenic(boolean autoGenIC)
|
void |
setAutoGenicArgs(String args)
|
void |
setAutoloaddir(String directories)
|
void |
setCmiService(org.ow2.jonas.cmi.CmiService cmiService)
Set the reference on CMI service. |
void |
setComponentContextFactory(org.ow2.jonas.naming.JComponentContextFactory componentContextFactory)
|
void |
setDeployerManager(org.ow2.util.ee.deploy.api.deployer.IDeployerManager deployerManager)
|
void |
setDescriptors(String descriptors)
|
void |
setHaService(org.ow2.jonas.ha.HaService haService)
Set the reference on HA service. |
void |
setJmxService(org.ow2.jonas.jmx.JmxService jmxService)
|
void |
setNaming(org.ow2.jonas.naming.JNamingManager naming)
|
void |
setParsingwithvalidation(boolean validate)
|
void |
setRegistry(org.ow2.jonas.registry.RegistryService registry)
|
void |
setResourceService(org.ow2.jonas.resource.ResourceService resService)
Set the reference on resource service. |
void |
setSecurityService(org.ow2.jonas.security.SecurityService securityService)
|
void |
setTransactionService(org.ow2.jonas.tm.TransactionService transactionService)
|
void |
setWebServicesService(org.ow2.jonas.ws.WebServicesService webServicesService)
|
void |
setWorkManagerService(org.ow2.jonas.workmanager.WorkManagerService workManagerService)
|
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.ow2.jonas.lib.service.AbsServiceImpl |
|---|
convertToList, doInit, getDomainName, getJonasServerName, getName, getServerProperties, init, isOSGi, isStarted, setName, setServerProperties, start, stop, throwRequirementException, toString |
| Methods inherited from class org.ow2.jonas.lib.reconfig.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, wait, wait, wait |
| Methods inherited from interface org.ow2.jonas.service.Service |
|---|
getName, init, isStarted, setName, start, stop |
| Field Detail |
|---|
protected static final String JONAS_BASE
protected static final String EJBJARS_DIR
public static final String BMP
public static final String CMP
| Constructor Detail |
|---|
public JOnASEJBService()
| Method Detail |
|---|
public void setAutoGenic(boolean autoGenIC)
autoGenIC - Engage Auto GenIC ?public void setParsingwithvalidation(boolean validate)
validate - Use a validating parser ?public void setDescriptors(String descriptors)
descriptors - List of EjbJars to be deployed at startup.public void setAutoloaddir(String directories)
directories - Autoloaded directories.public void setAutoGenicArgs(String args)
args - List of arguments to the Auto-GenIC process.
public void checkRequirements()
throws org.ow2.jonas.service.ServiceException
checkRequirements in interface org.ow2.jonas.service.ServicecheckRequirements in class org.ow2.jonas.lib.service.AbsServiceImplorg.ow2.jonas.service.ServiceExceptionAbsServiceImpl.checkRequirements()
public void doStart()
throws org.ow2.jonas.service.ServiceException
doStart in class org.ow2.jonas.lib.service.AbsServiceImplorg.ow2.jonas.service.ServiceExceptionpublic void doStop()
doStop in class org.ow2.jonas.lib.service.AbsServiceImpl
public String createContainer(Context ctx)
throws Exception
createContainer in interface org.ow2.jonas.ejb.EJBServiceException - if an error occur during the creation of the container.public org.ow2.jonas.lib.ejb21.Container getContainer(String fileName)
fileName - given file name on which
public void removeContainer(org.ow2.jonas.lib.ejb21.Container cont)
public org.ow2.jonas.lib.ejb21.Container[] listContainers()
public void syncAllEntities(boolean passivate)
syncAllEntities in interface org.ow2.jonas.ejb.EJBServicesyncAllEntities in interface JOnASEJBServiceMBeanpassivate - passivate instances after synchronization.public Integer getCurrentNumberOfContainer()
getCurrentNumberOfContainer in interface JOnASEJBServiceMBeanpublic Integer getTotalCurrentNumberOfBeanType()
getTotalCurrentNumberOfBeanType in interface JOnASEJBServiceMBeanpublic Integer getTotalCurrentNumberOfBMPType()
getTotalCurrentNumberOfBMPType in interface JOnASEJBServiceMBeanpublic Integer getTotalCurrentNumberOfCMPType()
getTotalCurrentNumberOfCMPType in interface JOnASEJBServiceMBeanpublic Integer getTotalCurrentNumberOfSBFType()
getTotalCurrentNumberOfSBFType in interface JOnASEJBServiceMBeanpublic Integer getTotalCurrentNumberOfSBLType()
getTotalCurrentNumberOfSBLType in interface JOnASEJBServiceMBeanpublic Integer getTotalCurrentNumberOfMDBType()
getTotalCurrentNumberOfMDBType in interface JOnASEJBServiceMBean
public void removeContainer(String fileName)
throws Exception
removeContainer in interface org.ow2.jonas.ejb.EJBServicefileName - name of the file containing the JAR module
Exception
public String createContainer(String file)
throws Exception
createContainer in interface org.ow2.jonas.ejb.EJBServicefile - Name of the file to be deployed
Exceptionpublic Boolean isJarDeployed(String fileName)
isJarDeployed in interface org.ow2.jonas.ejb.EJBServicefileName - the name of the jar file
public boolean isJarDeployedByWorkName(String workFileName)
isJarDeployedByWorkName in interface org.ow2.jonas.ejb.EJBServiceworkFileName - the internal name of the jar file (working copy)
public Set getDataSourceDependence(String dsName)
getDataSourceDependence in interface JOnASEJBServiceMBeanpublic Set getJmsDestinationDependence(String destName)
getJmsDestinationDependence in interface JOnASEJBServiceMBeanpublic Set getJmsConnectionFactoryDependence(String cfName)
getJmsConnectionFactoryDependence in interface JOnASEJBServiceMBeanpublic Set getMailFactoryDependence(String mfName)
getMailFactoryDependence in interface JOnASEJBServiceMBean
public List getInstalledJars()
throws Exception
getInstalledJars in interface JOnASEJBServiceMBeanException - if the list can't be retrieved
public void deployJars(Context ctx)
throws org.ow2.jonas.service.ServiceException
deployJars in interface org.ow2.jonas.ejb.EJBServicectx - the context containing the configuration to deploy the
ejbjars. org.ow2.jonas.service.ServiceException - if an error occurs during the deployment.public void unDeployJars(URL[] urls)
unDeployJars in interface org.ow2.jonas.ejb.EJBServiceurls - the list of the urls of the ejb-jars to undeploy.
public void removeContainer(org.ow2.jonas.lib.ejb21.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 org.ow2.jonas.ejb.EJBServiceearClassLoader - the ClassLoader of the ear application to remove
from the cache.public boolean isJarLoaded(String fileName)
isJarLoaded in interface JOnASEJBServiceMBeanfileName - the name of the jar file.
public List getDeployedJars()
getDeployedJars in interface JOnASEJBServiceMBean
public List getDeployableJars()
throws Exception
getDeployableJars in interface JOnASEJBServiceMBeanException - when cannot get installed jars listpublic List getAutoloadDirectories()
public String getJarsDirectory()
getJarsDirectory in interface JOnASEJBServiceMBean
public void checkGenIC(String fileName,
URL[] urls)
checkGenIC in interface org.ow2.jonas.ejb.EJBServicefileName - given EJB-JAR file.urls - Array of URLs used as CLASSPATH during EJB compilationpublic String getContainerContextID(String containerFileName)
getContainerContextID in interface org.ow2.jonas.ejb.EJBServicepublic Timer getTimer(org.ow2.jonas.ejb.JTimerHandleInfo info)
getTimer in interface org.ow2.jonas.ejb.EJBServicepublic Timer restartTimer(org.ow2.jonas.ejb.JTimerHandleInfo info)
restartTimer in interface org.ow2.jonas.ejb.EJBServicepublic void setJmxService(org.ow2.jonas.jmx.JmxService jmxService)
jmxService - the jmxService to setpublic void setSecurityService(org.ow2.jonas.security.SecurityService securityService)
securityService - the securityService to setpublic void setTransactionService(org.ow2.jonas.tm.TransactionService transactionService)
transactionService - the transactionService to setpublic void setWorkManagerService(org.ow2.jonas.workmanager.WorkManagerService workManagerService)
workManagerService - the workManagerService to setpublic void setWebServicesService(org.ow2.jonas.ws.WebServicesService webServicesService)
webServicesService - the webServicesService to setpublic void setNaming(org.ow2.jonas.naming.JNamingManager naming)
naming - the naming to setpublic void setComponentContextFactory(org.ow2.jonas.naming.JComponentContextFactory componentContextFactory)
componentContextFactory - the componentContextFactory to setpublic void setRegistry(org.ow2.jonas.registry.RegistryService registry)
registry - the registry to setpublic void setHaService(org.ow2.jonas.ha.HaService haService)
haService - the reference on HA servicepublic void setResourceService(org.ow2.jonas.resource.ResourceService resService)
resService - the reference on Resource servicepublic org.ow2.jonas.cmi.CmiService getCmiService()
public void setCmiService(org.ow2.jonas.cmi.CmiService cmiService)
cmiService - the reference on CMI servicepublic void setDeployerManager(org.ow2.util.ee.deploy.api.deployer.IDeployerManager deployerManager)
deployerManagerService - the deployerManagerService to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||