org.jboss.management.j2ee
Class EJBModule

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.J2EEDeployedObject (src) 
                  extended byorg.jboss.management.j2ee.J2EEModule (src) 
                      extended byorg.jboss.management.j2ee.EJBModule
All Implemented Interfaces:
MBeanRegistration (src) , NotificationBroadcaster (src) , NotificationEmitter (src) , Service (src) , ServiceMBean (src)

public class EJBModule
extends J2EEModule (src)

Root class of the JBoss JSR-77 implementation of EJBModule.


Field Summary
 
Fields inherited from class org.jboss.management.j2ee.J2EEDeployedObject (src)
APPLICATION, CMP, EJB, JAWS, JBOSS, JBOSS_WEB, RAR, SAR, WEB
 
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
EJBModule(java.lang.String jarName, ObjectName (src)  jsr77ParentName, java.lang.String[] pJVMs, java.lang.String pDeploymentDescriptor, ObjectName (src)  moduleServiceName, java.lang.String pJBossDD, java.lang.String pJAWSDD, java.lang.String pCMPDD)
          Constructor taking the Name of this Object
 
Method Summary
 void addChild(ObjectName (src)  pChild)
           
static ObjectName (src) create(MBeanServer (src)  mbeanServer, java.lang.String earName, java.lang.String jarName, java.net.URL pURL, ObjectName (src)  moduleServiceName)
          Creates the JSR-77 EJBModule
static void destroy(MBeanServer (src)  mbeanServer, ObjectName (src)  jsr77Name)
          Destroyes the given JSR-77 EJB-Module
 java.lang.String getcmpDeploymentDescriptor()
           
 java.lang.String getejb(int pIndex)
           
 java.lang.String[] getejbs()
           
 java.lang.String getEventType(int index)
           
 java.lang.String[] getEventTypes()
           
 java.lang.String getjawsDeploymentDescriptor()
           
 java.lang.String getjbossDeploymentDescriptor()
           
protected  java.util.Hashtable getParentKeys(ObjectName (src)  jsr77ParentName)
          This method can be overwritten by any subclass which must return <parent-j2eeType> indicating its parents.
 void postCreation()
           
 void preDestruction()
           
 void removeChild(ObjectName (src)  pChild)
           
 java.lang.String toString()
           
 
Methods inherited from class org.jboss.management.j2ee.J2EEModule (src)
getjavaVM, getjavaVMs
 
Methods inherited from class org.jboss.management.j2ee.J2EEDeployedObject (src)
getdeploymentDescriptor, getDeploymentDescriptor, getserver
 
Methods inherited from class org.jboss.management.j2ee.J2EEManagedObject (src)
getobjectName, getObjectName, getObjectName, getparent, getType, getType, iseventProvider, isstateManageable, isstatisticsProvider, newObjectName, postRegister, preDeregister, 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
 

Constructor Detail

EJBModule

public EJBModule(java.lang.String jarName,
                 ObjectName (src)  jsr77ParentName,
                 java.lang.String[] pJVMs,
                 java.lang.String pDeploymentDescriptor,
                 ObjectName (src)  moduleServiceName,
                 java.lang.String pJBossDD,
                 java.lang.String pJAWSDD,
                 java.lang.String pCMPDD)
          throws MalformedObjectNameException (src) ,
                 InvalidParentException (src) 
Constructor taking the Name of this Object

Parameters:
jarName - the ejb jar name which must not be null
jsr77ParentName - ObjectName of the Parent this Module belongs too. Either it is a J2EEApplication or J2EEServer if a standalone module.
pJVMs - Array of ObjectNames of the JVM this module is deployed on
pDeploymentDescriptor - Content of the module deployment descriptor
moduleServiceName - ObjectName of the service this Managed Object represent used for state management (start and stop)
Throws:
MalformedObjectNameException (src) - If name or application name is incorrect
java.security.InvalidParameterException - If the given Name is null
InvalidParentException (src)
Method Detail

create

public static ObjectName (src)  create(MBeanServer (src)  mbeanServer,
                                java.lang.String earName,
                                java.lang.String jarName,
                                java.net.URL pURL,
                                ObjectName (src)  moduleServiceName)
Creates the JSR-77 EJBModule

Parameters:
mbeanServer - MBeanServer the EJBModule is created on
earName - the ear name unless null which indicates a standalone module (no EAR)
jarName - the ejb.jar name
pURL - URL path to the local deployment of the module (where to find the DD file)
moduleServiceName - ObjectName of the EjbModule service to start and stop the module
Returns:
the JSR77 ObjectName of the EJBModule

destroy

public static void destroy(MBeanServer (src)  mbeanServer,
                           ObjectName (src)  jsr77Name)
Destroyes the given JSR-77 EJB-Module

Parameters:
mbeanServer - The JMX MBeanServer the desired EJB-Module is registered on
jsr77Name - the JSR77 EJBModule component ObjectName

getejbs

public java.lang.String[] getejbs()

getejb

public java.lang.String getejb(int pIndex)

getjbossDeploymentDescriptor

public java.lang.String getjbossDeploymentDescriptor()
Returns:
JBoss Deployment Descriptor

getjawsDeploymentDescriptor

public java.lang.String getjawsDeploymentDescriptor()
Returns:
JAWS Deployment Descriptor

getcmpDeploymentDescriptor

public java.lang.String getcmpDeploymentDescriptor()
Returns:
CMP 2.0 Deployment Descriptor

addChild

public void addChild(ObjectName (src)  pChild)
Overrides:
addChild in class J2EEManagedObject (src)

removeChild

public void removeChild(ObjectName (src)  pChild)
Overrides:
removeChild in class J2EEManagedObject (src)

postCreation

public void postCreation()
Overrides:
postCreation in class J2EEManagedObject (src)

preDestruction

public void preDestruction()
Overrides:
preDestruction in class J2EEManagedObject (src)

getEventTypes

public java.lang.String[] getEventTypes()

getEventType

public java.lang.String getEventType(int index)

toString

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

getParentKeys

protected java.util.Hashtable getParentKeys(ObjectName (src)  jsr77ParentName)
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:
jsr77ParentName - the WebModule parent's JSR77 ObjectName
Returns:
A hashtable with the J2EE-Application and J2EE-Server as parent