站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 management API Documentation 英文版文档

EJB (JBoss/Management API) - JBoss 4.0.1 sp1 management API Documentation 英文版文档


org.jboss.management.j2ee
Class EJB

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended byorg.jboss.system.ServiceMBeanSupport
          extended byorg.jboss.management.j2ee.J2EEManagedObject
              extended byorg.jboss.management.j2ee.EJB
All Implemented Interfaces:
EJBMBean, J2EEManagedObjectMBean, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, Serializable, org.jboss.system.Service, org.jboss.system.ServiceMBean, StatisticsProvider
Direct Known Subclasses:
EntityBean, MessageDrivenBean, SessionBean

public abstract class EJB
extends J2EEManagedObject
implements EJBMBean

Root class of the JBoss JSR-77.3.10 EJB model

Version:
$Revision: 1.14 $
Author:
Andreas Schaefer., Scott.Stark@jboss.org, thomas.diesler@jboss.org
See Also:
Serialized Form

Field Summary
protected  javax.management.ObjectName 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
NAME, TYPE
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
EJB(String ejbType, String ejbName, javax.management.ObjectName ejbModuleName, javax.management.ObjectName ejbContainerName)
          Create a EJB model
 
Method Summary
static javax.management.ObjectName create(javax.management.MBeanServer mbeanServer, javax.management.ObjectName ejbModuleName, javax.management.ObjectName ejbContainerName, int ejbType, String jndiName)
          Create a JSR77 EJB submodel.
static void destroy(javax.management.MBeanServer mbeanServer, javax.management.ObjectName jsr77Name)
           
protected  javax.management.ObjectName getContainerCacheName()
           
protected  javax.management.ObjectName getContainerName()
           
protected  javax.management.ObjectName getContainerPoolName()
           
protected  Hashtable getParentKeys(javax.management.ObjectName pParent)
          This method can be overwritten by any subclass which must return <parent-j2eeType> indicating its parents.
abstract  javax.management.j2ee.statistics.Stats getstats()
          Obtain the Stats from the StatisticsProvider.
abstract  void resetStats()
          Reset all statistics in the StatisticsProvider
 String toString()
           
protected  void updateCommonStats(EJBStatsImpl stats)
          Obtain the Stats from the StatisticsProvider.
 
Methods inherited from class org.jboss.management.j2ee.J2EEManagedObject
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
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
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.jboss.management.j2ee.J2EEManagedObjectMBean
addChild, getobjectName, getparent, iseventProvider, isstateManageable, isstatisticsProvider, removeChild, setparent
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Field Detail

ENTITY_BEAN

public static final int ENTITY_BEAN
See Also:
Constant Field Values

STATEFUL_SESSION_BEAN

public static final int STATEFUL_SESSION_BEAN
See Also:
Constant Field Values

STATELESS_SESSION_BEAN

public static final int STATELESS_SESSION_BEAN
See Also:
Constant Field Values

MESSAGE_DRIVEN_BEAN

public static final int MESSAGE_DRIVEN_BEAN
See Also:
Constant Field Values

ejbContainerName

protected javax.management.ObjectName ejbContainerName
The ObjectName of the ejb container MBean

Constructor Detail

EJB

public EJB(String ejbType,
           String ejbName,
           javax.management.ObjectName ejbModuleName,
           javax.management.ObjectName ejbContainerName)
    throws javax.management.MalformedObjectNameException,
           InvalidParentException
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:
javax.management.MalformedObjectNameException
InvalidParentException
Method Detail

create

public static javax.management.ObjectName create(javax.management.MBeanServer mbeanServer,
                                                 javax.management.ObjectName ejbModuleName,
                                                 javax.management.ObjectName ejbContainerName,
                                                 int ejbType,
                                                 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(javax.management.MBeanServer mbeanServer,
                           javax.management.ObjectName jsr77Name)

getstats

public abstract javax.management.j2ee.statistics.Stats getstats()
Obtain the Stats from the StatisticsProvider.

Specified by:
getstats in interface EJBMBean
Returns:
An EJBStats subclass

resetStats

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

Specified by:
resetStats in interface EJBMBean

toString

public String toString()
Overrides:
toString in class J2EEManagedObject

updateCommonStats

protected void updateCommonStats(EJBStatsImpl 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 javax.management.ObjectName getContainerName()
Returns:
the JMX name of the EJB container

getContainerCacheName

protected javax.management.ObjectName getContainerCacheName()
Returns:
the JMX name of the EJB container cache

getContainerPoolName

protected javax.management.ObjectName getContainerPoolName()
Returns:
the JMX name of the EJB container pool

getParentKeys

protected Hashtable getParentKeys(javax.management.ObjectName pParent)
Description copied from class: J2EEManagedObject
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
Parameters:
pParent - The direct parent of this class
Returns:
A hashtable with the EJB-Module, J2EE-Application and J2EE-Server as parent


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.