org.ow2.jonas.cmi.internal
Class CmiServiceImpl
java.lang.Object
javax.management.NotificationBroadcasterSupport
org.ow2.jonas.lib.reconfig.ReconfigEmitter
org.ow2.jonas.lib.service.AbsServiceImpl
org.ow2.jonas.cmi.internal.CmiServiceImpl
- All Implemented Interfaces:
- NotificationBroadcaster, NotificationEmitter, org.ow2.jonas.cmi.CmiService, org.ow2.jonas.service.Service
public class CmiServiceImpl
- extends org.ow2.jonas.lib.service.AbsServiceImpl
- implements org.ow2.jonas.cmi.CmiService
CMI Service interface. It provides a way to use CMI with JOnAS.
- Author:
- Loris Bouzonnet
| Fields inherited from class org.ow2.jonas.lib.reconfig.ReconfigEmitter |
RECONFIG_TYPE, SAVE_RECONFIG_TYPE |
|
Constructor Summary |
CmiServiceImpl(org.osgi.framework.BundleContext context)
Constructor providing the bundle context. |
| 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 interface org.ow2.jonas.service.Service |
getName, init, isStarted, setName, start, stop |
CmiServiceImpl
public CmiServiceImpl(org.osgi.framework.BundleContext context)
- Constructor providing the bundle context.
- Parameters:
context - the bundle context
doStart
protected void doStart()
throws org.ow2.jonas.service.ServiceException
- Start the service.
- Specified by:
doStart in class org.ow2.jonas.lib.service.AbsServiceImpl
- Throws:
org.ow2.jonas.service.ServiceException - when cannot configure or start the CMI instance.
doStop
protected void doStop()
throws org.ow2.jonas.service.ServiceException
- Stop the service.
- Specified by:
doStop in class org.ow2.jonas.lib.service.AbsServiceImpl
- Throws:
org.ow2.jonas.service.ServiceException - when the CMI server side manager cannot be stopped.
addClusteredObject
public void addClusteredObject(String jndiName,
String clusterPolicyName,
Class<?> homeClass,
Class<? extends EJBObject> remoteClass,
ClassLoader classLoader,
boolean stateful,
boolean clusterReplicated)
throws Exception
- Add a bean to the cluster.
- Specified by:
addClusteredObject in interface org.ow2.jonas.cmi.CmiService
- Parameters:
jndiName - name of the beanclusterPolicyName - filenamehomeClass - class of the home interfaceremoteClass - class of the remote interfaceclassLoader - the classloader used by the container of this beanstateful - true if the bean has a stateclusterReplicated - true if the bean is replicated (ha service is required)
- Throws:
Exception - if the provided policy of load-balancing is not valid
getJmxService
protected org.ow2.jonas.jmx.JmxService getJmxService()
- Returns:
- the jmxService
setJmxService
public void setJmxService(org.ow2.jonas.jmx.JmxService jmxService)
- Parameters:
jmxService - the jmxService to set
Copyright © 2008 OW2 Consortium. All Rights Reserved.