org.objectweb.jonas.mejb
Interface DomainManagement

All Superinterfaces:
javax.ejb.EJBObject, javax.management.j2ee.Management, java.rmi.Remote

public interface DomainManagement
extends javax.management.j2ee.Management

This is a variation on the javax.management.j2ee.Management interface required to be exposed by JOnAS through the MEJB session bean. This extends the main functionality of the MEJB session bean by allowing clients to query mbean information from other servers within the same domain.

Please Note: domainServerName in any of the exposed methods can be set to one of the values of the array returned by the following call to a master server: getAttribute(null, domainObjectName, "serverNames") where ObjectName domainObjectName corresponds to the ObjectName: domainName:j2eeType=J2EEDomain,name=domainName

Author:
Vivek Lakshmanan

Method Summary
 java.lang.Object getAttribute(java.lang.String domainServerName, javax.management.ObjectName name, java.lang.String attribute)
          Gets the value of a specified attribute inside the mbean corresponding to the objectname name for the server with name domainServerName .
 javax.management.AttributeList getAttributes(java.lang.String domainServerName, javax.management.ObjectName name, java.lang.String[] attributes)
          Gets the values of attributes in attributes inside the mbean corresponding to the objectname name for the server with name domainServerName.
 java.lang.Integer getMBeanCount(java.lang.String domainServerName)
          The number of MBeans registered in the mbean server corresponding to the server domainServerName in the domain.
 javax.management.MBeanInfo getMBeanInfo(java.lang.String domainServerName, javax.management.ObjectName name)
          Get information about a specific MBean with ObjectName name registered on server domainServerName.
 java.lang.Object invoke(java.lang.String domainServerName, javax.management.ObjectName name, java.lang.String operationName, java.lang.Object[] params, java.lang.String[] signature)
          Invoke an operation on an MBean with ObjectName name.
 boolean isRegistered(java.lang.String domainServerName, javax.management.ObjectName name)
          Check if the MBean with ObjectName name is registered in the server with the name domainServerName.
 java.util.Set queryNames(java.lang.String domainServerName, javax.management.ObjectName name, javax.management.QueryExp query)
          Query for ObjectNames on the server named domainServerNamebased on a query string.
 void setAttribute(java.lang.String domainServerName, javax.management.ObjectName name, javax.management.Attribute attribute)
          Sets the value of a specified attribute inside the mbean corresponding to the objectname name for the server with name domainServerName .
 javax.management.AttributeList setAttributes(java.lang.String domainServerName, javax.management.ObjectName name, javax.management.AttributeList attributes)
          Sets the values of attributes in attributes inside the mbean corresponding to the objectname name for the server with name domainServerName.
 
Methods inherited from interface javax.management.j2ee.Management
getAttribute, getAttributes, getDefaultDomain, getListenerRegistry, getMBeanCount, getMBeanInfo, invoke, isRegistered, queryNames, setAttribute, setAttributes
 
Methods inherited from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 

Method Detail

getAttribute

java.lang.Object getAttribute(java.lang.String domainServerName,
                              javax.management.ObjectName name,
                              java.lang.String attribute)
                              throws javax.management.MBeanException,
                                     javax.management.AttributeNotFoundException,
                                     javax.management.InstanceNotFoundException,
                                     javax.management.ReflectionException,
                                     java.rmi.RemoteException
Gets the value of a specified attribute inside the mbean corresponding to the objectname name for the server with name domainServerName .

Parameters:
domainServerName - Name of the server in domain. Use null for referring to this server.
name - ObjectName corresponding to the MBean to query.
attribute - The member attribute to be queried.
Returns:
Value of the attribute.
Throws:
javax.management.MBeanException
javax.management.AttributeNotFoundException
javax.management.InstanceNotFoundException
javax.management.ReflectionException
java.rmi.RemoteException

getAttributes

javax.management.AttributeList getAttributes(java.lang.String domainServerName,
                                             javax.management.ObjectName name,
                                             java.lang.String[] attributes)
                                             throws javax.management.InstanceNotFoundException,
                                                    javax.management.ReflectionException,
                                                    java.rmi.RemoteException
Gets the values of attributes in attributes inside the mbean corresponding to the objectname name for the server with name domainServerName.

Parameters:
domainServerName - Name of the server in domain. Use null for referring to this server.
name - ObjectName corresponding to the MBean to query.
attributes - Array of attribute names to be queried.
Returns:
Value of the attributes.
Throws:
javax.management.InstanceNotFoundException
javax.management.ReflectionException
java.rmi.RemoteException

getMBeanCount

java.lang.Integer getMBeanCount(java.lang.String domainServerName)
                                throws javax.management.MBeanException,
                                       javax.management.AttributeNotFoundException,
                                       javax.management.InstanceNotFoundException,
                                       javax.management.ReflectionException,
                                       java.rmi.RemoteException
The number of MBeans registered in the mbean server corresponding to the server domainServerName in the domain.

Parameters:
domainServerName - Name of the server in domain. Use null for referring to this server.
Returns:
Number of MBeans currently registered in server.
Throws:
javax.management.MBeanException
javax.management.AttributeNotFoundException
javax.management.InstanceNotFoundException
javax.management.ReflectionException
java.rmi.RemoteException

getMBeanInfo

javax.management.MBeanInfo getMBeanInfo(java.lang.String domainServerName,
                                        javax.management.ObjectName name)
                                        throws javax.management.IntrospectionException,
                                               javax.management.InstanceNotFoundException,
                                               javax.management.ReflectionException,
                                               java.rmi.RemoteException
Get information about a specific MBean with ObjectName name registered on server domainServerName.

Parameters:
domainServerName - Name of the server in domain. Use null for referring to this server.
name - ObjectName corresponding to the MBean to query.
Returns:
Information about queried MBean.
Throws:
javax.management.IntrospectionException
javax.management.InstanceNotFoundException
javax.management.ReflectionException
java.rmi.RemoteException

invoke

java.lang.Object invoke(java.lang.String domainServerName,
                        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
Invoke an operation on an MBean with ObjectName name.

Parameters:
domainServerName - Name of the server in domain. Use null for referring to this server.
name - ObjectName corresponding to the MBean to query.
operationName - Name of operation to invoke.
params - Parameters to pass to the operation.
signature - Signature of operation.
Returns:
Result of invocation.
Throws:
javax.management.MBeanException
javax.management.InstanceNotFoundException
javax.management.ReflectionException
java.rmi.RemoteException

isRegistered

boolean isRegistered(java.lang.String domainServerName,
                     javax.management.ObjectName name)
                     throws java.rmi.RemoteException
Check if the MBean with ObjectName name is registered in the server with the name domainServerName.

Parameters:
domainServerName - Name of the server in domain. Use null for referring to this server.
name - ObjectName corresponding to the MBean to query.
Returns:
true if registered.
Throws:
java.rmi.RemoteException

queryNames

java.util.Set queryNames(java.lang.String domainServerName,
                         javax.management.ObjectName name,
                         javax.management.QueryExp query)
                         throws java.rmi.RemoteException
Query for ObjectNames on the server named domainServerNamebased on a query string.

Parameters:
domainServerName - Name of the server in domain. Use null for referring to this server.
name - ObjectName corresponding to the query string.
query - Query expression to apply on ObjectName.
Returns:
MBeans matching the query.
Throws:
java.rmi.RemoteException

setAttribute

void setAttribute(java.lang.String domainServerName,
                  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
Sets the value of a specified attribute inside the mbean corresponding to the objectname name for the server with name domainServerName .

Parameters:
domainServerName - Name of the server in domain. Use null for referring to this server.
name - ObjectName corresponding to the query string.
attribute - The member attribute to be set.
Throws:
javax.management.MBeanException
javax.management.AttributeNotFoundException
javax.management.InstanceNotFoundException
javax.management.InvalidAttributeValueException
javax.management.ReflectionException
java.rmi.RemoteException

setAttributes

javax.management.AttributeList setAttributes(java.lang.String domainServerName,
                                             javax.management.ObjectName name,
                                             javax.management.AttributeList attributes)
                                             throws javax.management.InstanceNotFoundException,
                                                    javax.management.ReflectionException,
                                                    java.rmi.RemoteException
Sets the values of attributes in attributes inside the mbean corresponding to the objectname name for the server with name domainServerName.

Parameters:
domainServerName - Name of the server in domain. Use null for referring to this server.
name - ObjectName corresponding to the MBean.
attributes - Array of attribute names to be set.
Returns:
Values of the attributes.
Throws:
javax.management.InstanceNotFoundException
javax.management.ReflectionException
java.rmi.RemoteException