org.jboss.management.j2ee
Class EJB

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src) 
      extended byorg.jboss.system.ServiceMBeanSupport (src) 
          extended byorg.jboss.management.j2ee.J2EEManagedObject (src) 
              extended byorg.jboss.management.j2ee.EJB
All Implemented Interfaces:
MBeanRegistration (src) , NotificationBroadcaster (src) , NotificationEmitter (src) , Service (src) , ServiceMBean (src)
Direct Known Subclasses:
EntityBean (src) , MessageDrivenBean (src) , SessionBean (src)

public abstract class EJB
extends J2EEManagedObject (src)

Root class of the JBoss JSR-77.3.10 EJB model


Field Summary
protected  ObjectName (src) ejbContainerName
          The ObjectName of the ejb container MBean
static int ENTITY_BEAN
           
static int MESSAGE_DRIVEN_BEAN
           
static int STATEFUL_SESSION_BEAN
           
static int STATELESS_SESSION_BEAN
           
 
Fields inherited from class org.jboss.management.j2ee.J2EEManagedObject (src)
NAME, TYPE
 
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
EJB(java.lang.String ejbType, java.lang.String ejbName, ObjectName (src)  ejbModuleName, ObjectName (src)  ejbContainerName)
          Create a EJB model
 
Method Summary
static ObjectName (src) create(MBeanServer (src)  mbeanServer, ObjectName (src)  ejbModuleName, ObjectName (src)  ejbContainerName, int ejbType, java.lang.String jndiName)
          Create a JSR77 EJB submodel.
static void destroy(MBeanServer (src)  mbeanServer, ObjectName (src)  jsr77Name)
           
protected  ObjectName (src) getContainerCacheName()
           
protected  ObjectName (src) getContainerName()
           
protected  ObjectName (src) getContainerPoolName()
           
protected  java.util.Hashtable getParentKeys(ObjectName (src)  pParent)
          This method can be overwritten by any subclass which must return <parent-j2eeType> indicating its parents.
abstract  Stats (src) getstats()
          Obtain the Stats from the StatisticsProvider.
abstract  void resetStats()
          Reset all statistics in the StatisticsProvider
 java.lang.String toString()
           
protected  void updateCommonStats(EJBStatsImpl (src)  stats)
          Obtain the Stats from the StatisticsProvider.
 
Methods inherited from class org.jboss.management.j2ee.J2EEManagedObject (src)
addChild, getobjectName, getObjectName, getObjectName, getparent, getType, getType, iseventProvider, isstateManageable, isstatisticsProvider, newObjectName, postCreation, postRegister, preDeregister, preDestruction, removeChild, removeObject, removeObject, sendNotification, setparent
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src)
create, createService, destroy, destroyService, getLog, getName, getNextNotificationSequenceNumber, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, preRegister, start, startService, stop, stopService
 
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, wait, wait, wait
 

Field Detail

ENTITY_BEAN

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

STATEFUL_SESSION_BEAN

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

STATELESS_SESSION_BEAN

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

MESSAGE_DRIVEN_BEAN

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

ejbContainerName

protected ObjectName (src)  ejbContainerName
The ObjectName of the ejb container MBean

Constructor Detail

EJB

public EJB(java.lang.String ejbType,
           java.lang.String ejbName,
           ObjectName (src)  ejbModuleName,
           ObjectName (src)  ejbContainerName)
    throws MalformedObjectNameException (src) ,
           InvalidParentException (src) 
Create a EJB model

Parameters:
ejbType - the EJB.EJB_TYPES string
ejbName - the ejb name, currently the JNDI name
ejbModuleName - the JSR-77 EJBModule name for this bean
ejbContainerName - the JMX name of the JBoss ejb container MBean
Throws:
MalformedObjectNameException (src)
InvalidParentException (src)
Method Detail

create

public static ObjectName (src)  create(MBeanServer (src)  mbeanServer,
                                ObjectName (src)  ejbModuleName,
                                ObjectName (src)  ejbContainerName,
                                int ejbType,
                                java.lang.String jndiName)
Create a JSR77 EJB submodel.

Parameters:
mbeanServer - the MBeanServer to use for mbean creation
ejbModuleName - the name of the JSR77 EJBModule mbean
ejbContainerName - the name of the JBoss ejb container mbean
ejbType - an EJB.XXX_BEAN type constant value
jndiName - the jndi name of the ejb home
Returns:
the ObjectName of the JSR77 EJB mbean

destroy

public static void destroy(MBeanServer (src)  mbeanServer,
                           ObjectName (src)  jsr77Name)

getstats

public abstract Stats (src)  getstats()
Obtain the Stats from the StatisticsProvider.

Returns:
An EJBStats subclass

resetStats

public abstract void resetStats()
Reset all statistics in the StatisticsProvider


toString

public java.lang.String toString()
Overrides:
toString in class J2EEManagedObject (src)

updateCommonStats

protected void updateCommonStats(EJBStatsImpl (src)  stats)
Obtain the Stats from the StatisticsProvider. This method simply updates the statistics common to all EJBs: CreateCount RemoveCount InvocationTimes

It should be invoked to update these common statistics.


getContainerName

protected ObjectName (src)  getContainerName()
Returns:
the JMX name of the EJB container

getContainerCacheName

protected ObjectName (src)  getContainerCacheName()
Returns:
the JMX name of the EJB container cache

getContainerPoolName

protected ObjectName (src)  getContainerPoolName()
Returns:
the JMX name of the EJB container pool

getParentKeys

protected java.util.Hashtable getParentKeys(ObjectName (src)  pParent)
Description copied from class: J2EEManagedObject (src)
This method can be overwritten by any subclass which must return <parent-j2eeType> indicating its parents. By default it returns an empty hashtable instance.

Overrides:
getParentKeys in class J2EEManagedObject (src)
Parameters:
pParent - The direct parent of this class
Returns:
A hashtable with the EJB-Module, J2EE-Application and J2EE-Server as parent