org.ow2.jonas.ejb.easybeans
Class EasyBeansService

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.ejb.easybeans.EasyBeansService
All Implemented Interfaces:
NotificationBroadcaster, NotificationEmitter, IEasyBeansService, org.ow2.jonas.service.Service

public class EasyBeansService
extends org.ow2.jonas.lib.service.AbsServiceImpl
implements IEasyBeansService

Implementation of the service that runs the EasyBeans EJB3 container.

Author:
Florent Benoit

Field Summary
static String EASYBEANS_CLUSTER_CONFIG_FILE
          Name of the configuration file of EasyBeans for JOnAS with a support of clustering.
static String EASYBEANS_CONFIG_FILE
          Name of the configuration file of EasyBeans for JOnAS.
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
EasyBeansService()
          Default empty constructor.
EasyBeansService(org.osgi.framework.BundleContext bundleContext)
          Constructor in OSGi mode.
 
Method Summary
 void addContainer(org.ow2.easybeans.api.EZBContainer ejbContainer)
          Adds the given container.
protected  void configureExtraDialects()
          Configure some dialects that may be used with some databases used by JOnAS.
protected  void doStart()
          Abstract start-up method to be implemented by sub-classes.
protected  void doStop()
          Abstract method for service stopping to be implemented by sub-classes.
 org.ow2.jonas.cmi.CmiService getCmiService()
          Return a reference to the CMI service.
 org.ow2.easybeans.api.EZBServer getEasyBeansServer()
          TODO Remove it when EarDeployer will use EasyBeans Deployer.
static org.ow2.jonas.naming.JNamingManager getNamingManager()
          Returns the NamingManger.
 org.ow2.jonas.resource.ResourceService getResourceService()
           
 void removeContainer(org.ow2.easybeans.api.EZBContainer ejbContainer)
          Remove the given container.
 void setCmiService(org.ow2.jonas.cmi.CmiService cmiService)
          Set a reference to the CMI service.
 void setDeployerManager(org.ow2.util.ee.deploy.api.deployer.IDeployerManager deployerManager)
           
 void setJmxService(org.ow2.jonas.jmx.JmxService jmxService)
           
 void setNamingManager(org.ow2.jonas.naming.JNamingManager naming)
          Sets the NamingManger.
 void setResourceService(org.ow2.jonas.resource.ResourceService resourceService)
           
 
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

EASYBEANS_CONFIG_FILE

public static final String EASYBEANS_CONFIG_FILE
Name of the configuration file of EasyBeans for JOnAS.

See Also:
Constant Field Values

EASYBEANS_CLUSTER_CONFIG_FILE

public static final String EASYBEANS_CLUSTER_CONFIG_FILE
Name of the configuration file of EasyBeans for JOnAS with a support of clustering.

See Also:
Constant Field Values

JONAS_BASE

protected static final String JONAS_BASE
The name of the JONAS_BASE directory.

Constructor Detail

EasyBeansService

public EasyBeansService()
Default empty constructor.


EasyBeansService

public EasyBeansService(org.osgi.framework.BundleContext bundleContext)
Constructor in OSGi mode. It provides the bundle context.

Parameters:
bundleContext - the given bundle context.
Method Detail

doStart

protected void doStart()
                throws org.ow2.jonas.service.ServiceException
Abstract start-up method to be implemented by sub-classes.

Specified by:
doStart in class org.ow2.jonas.lib.service.AbsServiceImpl
Throws:
org.ow2.jonas.service.ServiceException - service start-up failed

doStop

protected void doStop()
               throws org.ow2.jonas.service.ServiceException
Abstract method for service stopping to be implemented by sub-classes.

Specified by:
doStop in class org.ow2.jonas.lib.service.AbsServiceImpl
Throws:
org.ow2.jonas.service.ServiceException - service stopping failed

configureExtraDialects

protected void configureExtraDialects()
Configure some dialects that may be used with some databases used by JOnAS.


getEasyBeansServer

public org.ow2.easybeans.api.EZBServer getEasyBeansServer()
Description copied from interface: IEasyBeansService
TODO Remove it when EarDeployer will use EasyBeans Deployer.

Specified by:
getEasyBeansServer in interface IEasyBeansService
Returns:
the Embedded instance used by this service.

setJmxService

public void setJmxService(org.ow2.jonas.jmx.JmxService jmxService)
Parameters:
jmxService - the jmxService to set

setDeployerManager

public void setDeployerManager(org.ow2.util.ee.deploy.api.deployer.IDeployerManager deployerManager)
Parameters:
deployerManagerService - the deployerManagerService to set

getNamingManager

public static org.ow2.jonas.naming.JNamingManager getNamingManager()
Returns the NamingManger.

Returns:
the NamingManger

setNamingManager

public void setNamingManager(org.ow2.jonas.naming.JNamingManager naming)
Sets the NamingManger.

Parameters:
naming - the NamingManger to set

setResourceService

public void setResourceService(org.ow2.jonas.resource.ResourceService resourceService)
Parameters:
resourceService - the resourceService to set

getResourceService

public org.ow2.jonas.resource.ResourceService getResourceService()
Returns:
the resourceService

setCmiService

public void setCmiService(org.ow2.jonas.cmi.CmiService cmiService)
Set a reference to the CMI service.

Parameters:
cmiService - a reference to the CMI service

getCmiService

public org.ow2.jonas.cmi.CmiService getCmiService()
Return a reference to the CMI service.

Returns:
a reference to the CMI service

addContainer

public void addContainer(org.ow2.easybeans.api.EZBContainer ejbContainer)
Adds the given container.

Specified by:
addContainer in interface IEasyBeansService
Parameters:
ejbContainer -

removeContainer

public void removeContainer(org.ow2.easybeans.api.EZBContainer ejbContainer)
Remove the given container.

Specified by:
removeContainer in interface IEasyBeansService
Parameters:
ejbContainer - the given container


Copyright © 2007 OW2 Consortium. All Rights Reserved.