org.objectweb.jonas.mejb
Class ManagementBean

java.lang.Object
  extended byorg.objectweb.jonas.mejb.ManagementBean
All Implemented Interfaces:
javax.ejb.EnterpriseBean, java.io.Serializable, javax.ejb.SessionBean

public class ManagementBean
extends java.lang.Object
implements javax.ejb.SessionBean

This is the Management EJB implementation for JOnAS. A MEJB instance is created and deployed at JOnAS start time. It is registered in the ejb/mgmt naming subcontext. The current implementation only allows access to managed resources from within the current server.

Author:
Adriana Danes
See Also:
Serialized Form

Constructor Summary
ManagementBean()
           
 
Method Summary
 void ejbActivate()
           
 void ejbCreate()
          ejbCreate method
 void ejbPassivate()
           
 void ejbRemove()
           
 java.lang.Object getAttribute(javax.management.ObjectName name, java.lang.String attribute)
           
 javax.management.AttributeList getAttributes(javax.management.ObjectName name, java.lang.String[] attributes)
           
 java.lang.String getDefaultDomain()
           
 javax.management.j2ee.ListenerRegistration getListenerRegistry()
          Returns the ListenerRegistration implementation object which allows the client to register a event notification listener.
 java.lang.Integer getMBeanCount()
           
 javax.management.MBeanInfo getMBeanInfo(javax.management.ObjectName name)
           
 java.lang.Object invoke(javax.management.ObjectName name, java.lang.String operationName, java.lang.Object[] params, java.lang.String[] signature)
           
 boolean isRegistered(javax.management.ObjectName name)
           
 java.util.Set queryNames(javax.management.ObjectName name, javax.management.QueryExp query)
           
 void setAttribute(javax.management.ObjectName name, javax.management.Attribute attribute)
           
 javax.management.AttributeList setAttributes(javax.management.ObjectName name, javax.management.AttributeList attributes)
           
 void setSessionContext(javax.ejb.SessionContext sessionContext)
          Sets the associated session context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManagementBean

public ManagementBean()
Method Detail

ejbCreate

public void ejbCreate()
ejbCreate method


ejbActivate

public void ejbActivate()
Specified by:
ejbActivate in interface javax.ejb.SessionBean

ejbPassivate

public void ejbPassivate()
Specified by:
ejbPassivate in interface javax.ejb.SessionBean

ejbRemove

public void ejbRemove()
Specified by:
ejbRemove in interface javax.ejb.SessionBean

setSessionContext

public void setSessionContext(javax.ejb.SessionContext sessionContext)
Sets the associated session context.

Specified by:
setSessionContext in interface javax.ejb.SessionBean
Parameters:
sessionContext - - A SessionContext interface for the instance.

getAttribute

public java.lang.Object getAttribute(javax.management.ObjectName name,
                                     java.lang.String attribute)
                              throws javax.management.MBeanException,
                                     javax.management.AttributeNotFoundException,
                                     javax.management.InstanceNotFoundException,
                                     javax.management.ReflectionException,
                                     java.rmi.RemoteException
Throws:
javax.management.MBeanException
javax.management.AttributeNotFoundException
javax.management.InstanceNotFoundException
javax.management.ReflectionException
java.rmi.RemoteException

getAttributes

public javax.management.AttributeList getAttributes(javax.management.ObjectName name,
                                                    java.lang.String[] attributes)
                                             throws javax.management.InstanceNotFoundException,
                                                    javax.management.ReflectionException,
                                                    java.rmi.RemoteException
Throws:
javax.management.InstanceNotFoundException
javax.management.ReflectionException
java.rmi.RemoteException

getDefaultDomain

public java.lang.String getDefaultDomain()
                                  throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

getMBeanCount

public java.lang.Integer getMBeanCount()
                                throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

getMBeanInfo

public javax.management.MBeanInfo getMBeanInfo(javax.management.ObjectName name)
                                        throws javax.management.IntrospectionException,
                                               javax.management.InstanceNotFoundException,
                                               javax.management.ReflectionException,
                                               java.rmi.RemoteException
Throws:
javax.management.IntrospectionException
javax.management.InstanceNotFoundException
javax.management.ReflectionException
java.rmi.RemoteException

invoke

public java.lang.Object invoke(javax.management.ObjectName name,
                               java.lang.String operationName,
                               java.lang.Object[] params,
                               java.lang.String[] signature)
                        throws javax.management.MBeanException,
                               javax.management.InstanceNotFoundException,
                               javax.management.ReflectionException,
                               java.rmi.RemoteException
Throws:
javax.management.MBeanException
javax.management.InstanceNotFoundException
javax.management.ReflectionException
java.rmi.RemoteException

isRegistered

public boolean isRegistered(javax.management.ObjectName name)
                     throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

queryNames

public java.util.Set queryNames(javax.management.ObjectName name,
                                javax.management.QueryExp query)
                         throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

setAttribute

public void setAttribute(javax.management.ObjectName name,
                         javax.management.Attribute attribute)
                  throws javax.management.MBeanException,
                         javax.management.AttributeNotFoundException,
                         javax.management.InstanceNotFoundException,
                         javax.management.InvalidAttributeValueException,
                         javax.management.ReflectionException,
                         java.rmi.RemoteException
Throws:
javax.management.MBeanException
javax.management.AttributeNotFoundException
javax.management.InstanceNotFoundException
javax.management.InvalidAttributeValueException
javax.management.ReflectionException
java.rmi.RemoteException

setAttributes

public javax.management.AttributeList setAttributes(javax.management.ObjectName name,
                                                    javax.management.AttributeList attributes)
                                             throws javax.management.InstanceNotFoundException,
                                                    javax.management.ReflectionException,
                                                    java.rmi.RemoteException
Throws:
javax.management.InstanceNotFoundException
javax.management.ReflectionException
java.rmi.RemoteException

getListenerRegistry

public javax.management.j2ee.ListenerRegistration getListenerRegistry()
                                                               throws java.rmi.RemoteException
Returns the ListenerRegistration implementation object which allows the client to register a event notification listener. This method also creates a MBean

Returns:
An instance of the class implementing the ListenerRegistration interface. null is returned if
Throws:
java.rmi.RemoteException