|
||||||||||
| 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.ejb2.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 |
WORK_DIR
The name of the working directory. |
protected static String |
WORK_EJBJARS_DIR
The name of the working ejbjars directory. |
| Fields inherited from class org.ow2.jonas.lib.reconfig.ReconfigEmitter |
|---|
RECONFIG_TYPE, SAVE_RECONFIG_TYPE |
| Constructor Summary | |
|---|---|
JOnASEJBService()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
applyMonitorSettings(String scope)
Applies the current monitoring settings to deployed EJBs. |
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 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. |
long |
getAverageBusinessProcessingTime()
get the average time spent in business execution for all beans of this ejb container per request |
long |
getAverageProcessingTime()
get the average time spent in container + business execution for all beans of this ejb container per request |
CmiService |
getCmiService()
|
Container |
getContainer(String fileName)
Get the Container by its file name (.xml or .jar). |
String |
getContainerContextID(String containerFileName)
|
Integer |
getCurrentNumberOfContainer()
MBean method. |
Set<ObjectName> |
getDataSourceDependence(String dsName)
MBean method. |
List<String> |
getDeployedJars()
Return the list of all loaded EJB container. |
org.ow2.util.event.api.IEventService |
getEventService()
|
Set<ObjectName> |
getJmsConnectionFactoryDependence(String cfName)
MBean method. |
Set<ObjectName> |
getJmsDestinationDependence(String destName)
MBean method. |
Set<ObjectName> |
getMailFactoryDependence(String mfName)
MBean method. |
boolean |
getMonitoringEnabled()
|
long |
getNumberOfCalls()
get the total number of calls on all beans of this ejb container |
IResourceCheckerManager |
getResourceCheckerManager()
|
Timer |
getTimer(JTimerHandleInfo info)
|
long |
getTotalBusinessProcessingTime()
get the total time spent in business execution for all beans of this ejb container |
Integer |
getTotalCurrentNumberOfBeanType()
MBean method. |
Integer |
getTotalCurrentNumberOfBMPType()
MBean method. |
Integer |
getTotalCurrentNumberOfCMPType()
MBean method. |
Integer |
getTotalCurrentNumberOfMDBType()
MBean method. |
Integer |
getTotalCurrentNumberOfSBFType()
MBean method. |
Integer |
getTotalCurrentNumberOfSBLType()
MBean method. |
long |
getTotalProcessingTime()
get the total time spent in container + business execution for all beans of this ejb container |
VersioningService |
getVersioningService()
|
int |
getWarningThreshold()
|
protected void |
initWorkingDirectory()
Create working directory for EJB2. |
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. |
boolean |
isVersioningEnabled()
|
Container[] |
listContainers()
|
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)
|
void |
setAutoGenic(boolean autoGenIC)
|
void |
setAutoGenicArgs(String args)
|
void |
setCmiService(CmiService cmiService)
Set the reference on CMI service. |
void |
setComponentContextFactory(JComponentContextFactory componentContextFactory)
|
void |
setDeployerManager(org.ow2.util.ee.deploy.api.deployer.IDeployerManager deployerManager)
|
void |
setEventService(org.ow2.util.event.api.IEventService eventService)
|
void |
setHaService(HaService haService)
Set the reference on HA service. |
void |
setJmxService(JmxService jmxService)
|
void |
setMonitoringEnabled(boolean monitoringEnabled)
|
void |
setNaming(JNamingManager naming)
|
void |
setParsingwithvalidation(boolean validate)
|
void |
setRegistry(RegistryService registry)
|
void |
setResourceCheckerManager(IResourceCheckerManager resourceCheckerManager)
Sets the resource checker manager. |
void |
setResourceService(ResourceService resService)
Set the reference on resource service. |
void |
setSecurityService(SecurityService securityService)
|
void |
setTransactionService(TransactionService transactionService)
|
void |
setVersioningService(VersioningService versioningService)
|
void |
setWarningThreshold(int warningThreshold)
|
void |
setWebServicesService(IJAXRPCService jaxrpcService)
|
protected void |
setWorkCleanerService(WorkCleanerService workCleanerService)
Method called when the workCleanerService is bound to the component. |
void |
setWorkManagerService(WorkManagerService workManagerService)
|
void |
syncAllEntities(boolean passivate)
Synchronized all entity bean containers. |
void |
unDeployJars(URL[] urls)
Undeploy the given ejb-jars of an ear file. |
void |
unsetResourceCheckerManager()
Unset the resource checker manager. |
void |
unsetVersioningService()
Sets the versioning service to null. |
| Methods inherited from class org.ow2.jonas.lib.service.AbsServiceImpl |
|---|
convertToList, doInit, getDomainName, getJonasServerName, getName, getServerProperties, init, 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 WORK_DIR
protected static final String WORK_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 setAutoGenicArgs(String args)
args - List of arguments to the Auto-GenIC process.
public void doStart()
throws ServiceException
doStart in class AbsServiceImplServiceExceptionpublic void doStop()
doStop in class AbsServiceImplprotected void initWorkingDirectory()
protected void setWorkCleanerService(WorkCleanerService workCleanerService)
workCleanerService - the workCleanerService reference
public String createContainer(Context ctx)
throws Exception
createContainer in interface EJBServicectx - Deployment context holding all needed values for an EjbJar deployment.
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)
cont - EJB 2.1 Container to be removedpublic Container[] listContainers()
public void syncAllEntities(boolean passivate)
syncAllEntities in interface 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 JOnASEJBServiceMBeanpublic List<String> getDeployedJars()
getDeployedJars in interface JOnASEJBServiceMBean
public void removeContainer(String fileName)
throws Exception
removeContainer in interface EJBServicefileName - name of the file containing the JAR module
Exception - when there is no such container to undeploy or when the service was unable to undeploy the container.
public String createContainer(String fileName)
throws Exception
createContainer in interface EJBServicefileName - Name of the file to be deployed
Exceptionpublic Boolean isJarDeployed(String fileName)
isJarDeployed in interface EJBServicefileName - the name of the jar file
public boolean isJarDeployedByWorkName(String workFileName)
isJarDeployedByWorkName in interface EJBServiceworkFileName - the internal name of the jar file (working copy)
public Set<ObjectName> getDataSourceDependence(String dsName)
getDataSourceDependence in interface JOnASEJBServiceMBeanpublic Set<ObjectName> getJmsDestinationDependence(String destName)
getJmsDestinationDependence in interface JOnASEJBServiceMBeanpublic Set<ObjectName> getJmsConnectionFactoryDependence(String cfName)
getJmsConnectionFactoryDependence in interface JOnASEJBServiceMBeanpublic Set<ObjectName> getMailFactoryDependence(String mfName)
getMailFactoryDependence in interface JOnASEJBServiceMBean
public void deployJars(Context ctx)
throws ServiceException
deployJars in interface EJBServicectx - 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 EJBServiceurls - 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 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 void checkGenIC(String fileName,
URL[] urls)
checkGenIC in interface EJBServicefileName - given EJB-JAR file.urls - Array of URLs used as CLASSPATH during EJB compilationpublic String getContainerContextID(String containerFileName)
getContainerContextID in interface EJBServicepublic Timer getTimer(JTimerHandleInfo info)
getTimer in interface EJBServicepublic Timer restartTimer(JTimerHandleInfo info)
restartTimer in interface EJBServicepublic void setJmxService(JmxService jmxService)
jmxService - the jmxService to setpublic void setSecurityService(SecurityService securityService)
securityService - the securityService to setpublic void setTransactionService(TransactionService transactionService)
transactionService - the transactionService to setpublic void setWorkManagerService(WorkManagerService workManagerService)
workManagerService - the workManagerService to setpublic void setWebServicesService(IJAXRPCService jaxrpcService)
jaxrpcService - the jaxrpcService to setpublic void setNaming(JNamingManager naming)
naming - the naming to setpublic void setComponentContextFactory(JComponentContextFactory componentContextFactory)
componentContextFactory - the componentContextFactory to setpublic void setRegistry(RegistryService registry)
registry - the registry to setpublic void setHaService(HaService haService)
haService - the reference on HA servicepublic void setResourceService(ResourceService resService)
resService - the reference on Resource servicepublic CmiService getCmiService()
public void setCmiService(CmiService cmiService)
cmiService - the reference on CMI servicepublic void setDeployerManager(org.ow2.util.ee.deploy.api.deployer.IDeployerManager deployerManager)
deployerManager - the IDeployerManager to setpublic void setVersioningService(VersioningService versioningService)
versioningService - The versioning service to set.public void unsetVersioningService()
public VersioningService getVersioningService()
public boolean isVersioningEnabled()
public boolean getMonitoringEnabled()
getMonitoringEnabled in interface JOnASEJBServiceMBeanpublic void setMonitoringEnabled(boolean monitoringEnabled)
setMonitoringEnabled in interface JOnASEJBServiceMBeanmonitoringEnabled - Whether EJB monitoring will enabled for EJBs deployed in the future.public int getWarningThreshold()
getWarningThreshold in interface JOnASEJBServiceMBeanpublic void setWarningThreshold(int warningThreshold)
setWarningThreshold in interface JOnASEJBServiceMBeanwarningThreshold - Number of milliseconds after which methods of EJBs deployed in the future will start warning.public long getNumberOfCalls()
getNumberOfCalls in interface JOnASEJBServiceMBeanpublic long getTotalProcessingTime()
getTotalProcessingTime in interface JOnASEJBServiceMBeanpublic long getTotalBusinessProcessingTime()
getTotalBusinessProcessingTime in interface JOnASEJBServiceMBeanpublic long getAverageProcessingTime()
getAverageProcessingTime in interface JOnASEJBServiceMBeanpublic long getAverageBusinessProcessingTime()
getAverageBusinessProcessingTime in interface JOnASEJBServiceMBeanpublic void applyMonitorSettings(String scope)
applyMonitorSettings in interface JOnASEJBServiceMBeanpublic void setEventService(org.ow2.util.event.api.IEventService eventService)
eventService - IEventService to set.public org.ow2.util.event.api.IEventService getEventService()
public IResourceCheckerManager getResourceCheckerManager()
public void setResourceCheckerManager(IResourceCheckerManager resourceCheckerManager)
resourceCheckerManager - the given instancepublic void unsetResourceCheckerManager()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||