org.jboss.ejb
Class EjbModule

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src) 
      extended byorg.jboss.system.ServiceMBeanSupport (src) 
          extended byorg.jboss.ejb.EjbModule
All Implemented Interfaces:
MBeanRegistration (src) , NotificationBroadcaster (src) , NotificationEmitter (src) , Service (src) , ServiceMBean (src)

public class EjbModule
extends ServiceMBeanSupport (src)

An EjbModule represents a collection of beans that are deployed as a unit.

The beans may use the EjbModule to access other beans within the same deployment unit.

See Also:
Container (src) , EJBDeployer (src)

Field Summary
static int ANY
           
static java.lang.String BASE_EJB_MODULE_NAME
           
static int BMT
           
static int CMT
           
static java.lang.String DEFAULT_ENTITY_BMP_CONFIGURATION
           
static java.lang.String DEFAULT_ENTITY_CMP_CONFIGURATION
           
static java.lang.String DEFAULT_MESSAGEDRIVEN_CONFIGURATION
           
static java.lang.String DEFAULT_STATEFUL_CONFIGURATION
           
static java.lang.String DEFAULT_STATELESS_CONFIGURATION
           
static ObjectName (src) EJB_MODULE_QUERY_NAME
           
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport (src)
server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean (src)
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
EjbModule(DeploymentInfo (src)  di, TransactionManager (src)  tm, ObjectName (src)  webServiceName)
           
 
Method Summary
 void addLocalHome(Container (src)  con, EJBLocalHome (src)  localHome)
           
protected  void createService()
          Sub-classes should override this method to provide custum 'create' logic.
protected  void destroyService()
          Sub-classes should override this method to provide custum 'destroy' logic.
 java.lang.ClassLoader getClassLoader()
          Get the class loader of this deployment unit.
 Container (src) getContainer(java.lang.String name)
          Get a container from this deployment unit that corresponds to a given name
 java.util.Collection getContainers()
          Get all containers in this deployment unit.
 EJBLocalHome (src) getLocalHome(Container (src)  con)
           
 java.lang.Object getModuleData(java.lang.Object key)
           
 java.util.Map getModuleDataMap()
           
 java.net.URL getURL()
          Get the URL from which this deployment unit was deployed
 boolean isCallByValue()
          Whether the container is call by value
 void putModuleData(java.lang.Object key, java.lang.Object value)
           
 void removeContainer(Container (src)  con)
          Remove a container from this deployment unit.
 void removeLocalHome(Container (src)  con)
           
 void removeModuleData(java.lang.Object key)
           
 void setClassLoader(java.lang.ClassLoader cl)
          Set the class loader of this deployment unit
protected  void startService()
          The mbean Service interface start method calls the start method on each contatiner, then the init method on each container.
protected  void stopService()
          Stops all the containers of this application.
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src)
create, destroy, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport (src)
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BASE_EJB_MODULE_NAME

public static final java.lang.String BASE_EJB_MODULE_NAME
See Also:
Constant Field Values (src)

EJB_MODULE_QUERY_NAME

public static final ObjectName (src)  EJB_MODULE_QUERY_NAME

DEFAULT_STATELESS_CONFIGURATION

public static java.lang.String DEFAULT_STATELESS_CONFIGURATION

DEFAULT_STATEFUL_CONFIGURATION

public static java.lang.String DEFAULT_STATEFUL_CONFIGURATION

DEFAULT_ENTITY_BMP_CONFIGURATION

public static java.lang.String DEFAULT_ENTITY_BMP_CONFIGURATION

DEFAULT_ENTITY_CMP_CONFIGURATION

public static java.lang.String DEFAULT_ENTITY_CMP_CONFIGURATION

DEFAULT_MESSAGEDRIVEN_CONFIGURATION

public static java.lang.String DEFAULT_MESSAGEDRIVEN_CONFIGURATION

BMT

public static final int BMT
See Also:
Constant Field Values (src)

CMT

public static final int CMT
See Also:
Constant Field Values (src)

ANY

public static final int ANY
See Also:
Constant Field Values (src)
Constructor Detail

EjbModule

public EjbModule(DeploymentInfo (src)  di,
                 TransactionManager (src)  tm,
                 ObjectName (src)  webServiceName)
Method Detail

getModuleDataMap

public java.util.Map getModuleDataMap()

getModuleData

public java.lang.Object getModuleData(java.lang.Object key)

putModuleData

public void putModuleData(java.lang.Object key,
                          java.lang.Object value)

removeModuleData

public void removeModuleData(java.lang.Object key)

removeContainer

public void removeContainer(Container (src)  con)
Remove a container from this deployment unit.

Parameters:
con -

addLocalHome

public void addLocalHome(Container (src)  con,
                         EJBLocalHome (src)  localHome)

removeLocalHome

public void removeLocalHome(Container (src)  con)

getLocalHome

public EJBLocalHome (src)  getLocalHome(Container (src)  con)

isCallByValue

public boolean isCallByValue()
Whether the container is call by value

Returns:
true for call by value

getContainer

public Container (src)  getContainer(java.lang.String name)
Get a container from this deployment unit that corresponds to a given name

Parameters:
name - ejb-name name defined in ejb-jar.xml
Returns:
container for the named bean, or null if the container was not found

getContainers

public java.util.Collection getContainers()
Get all containers in this deployment unit.

Returns:
a collection of containers for each enterprise bean in this deployment unit.

getClassLoader

public java.lang.ClassLoader getClassLoader()
Get the class loader of this deployment unit.

Returns:

setClassLoader

public void setClassLoader(java.lang.ClassLoader cl)
Set the class loader of this deployment unit


getURL

public java.net.URL getURL()
Get the URL from which this deployment unit was deployed

Returns:
The URL from which this Application was deployed.

createService

protected void createService()
                      throws java.lang.Exception
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'create' logic.

This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.

Overrides:
createService in class ServiceMBeanSupport (src)
Throws:
java.lang.Exception

startService

protected void startService()
                     throws java.lang.Exception
The mbean Service interface start method calls the start method on each contatiner, then the init method on each container. Conversion to a different registration system with one-phase startup is conceivable.

Overrides:
startService in class ServiceMBeanSupport (src)
Throws:
java.lang.Exception - if an error occurs

stopService

protected void stopService()
                    throws java.lang.Exception
Stops all the containers of this application.

Overrides:
stopService in class ServiceMBeanSupport (src)
Throws:
java.lang.Exception

destroyService

protected void destroyService()
                       throws java.lang.Exception
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'destroy' logic.

This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.

Overrides:
destroyService in class ServiceMBeanSupport (src)
Throws:
java.lang.Exception