org.ow2.jonas.cmi.internal
Class CmiServiceImpl

java.lang.Object
  extended by javax.management.NotificationBroadcasterSupport
      extended by org.ow2.jonas.lib.reconfig.ReconfigEmitter
          extended by org.ow2.jonas.lib.service.AbsServiceImpl
              extended by 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

Field Summary
protected static org.objectweb.util.monolog.api.Logger cmilogger
          Logger for traces
 
Fields inherited from class org.ow2.jonas.lib.reconfig.ReconfigEmitter
RECONFIG_TYPE, SAVE_RECONFIG_TYPE
 
Constructor Summary
CmiServiceImpl()
           
 
Method Summary
 void addClusteredObject(String jndiName, String clusterPolicyName, Class<?> homeClass, Class<? extends EJBObject> remoteClass, ClassLoader classLoader, boolean stateful, boolean clusterReplicated)
          Add a bean to the cluster.
protected  void doStart()
          Start the service.
protected  void doStop()
          Stop the service.
 
Methods inherited from class org.ow2.jonas.lib.service.AbsServiceImpl
checkRequirements, 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
checkRequirements, getName, init, isStarted, setName, start, stop
 

Field Detail

cmilogger

protected static org.objectweb.util.monolog.api.Logger cmilogger
Logger for traces

Constructor Detail

CmiServiceImpl

public CmiServiceImpl()
Method Detail

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

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

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 bean
clusterPolicyName - filename
homeClass - class of the home interface
remoteClass - class of the remote interface
classLoader - the classloader used by the container of this bean
stateful - true if the bean has a state
clusterReplicated - true if the bean is replicated (ha service is required)
Throws:
Exception - if the provided policy of load-balancing is not valid


Copyright © 2008 OW2 Consortium. All Rights Reserved.