org.objectweb.jonas.mejb
Interface DomainManagement

All Superinterfaces:
EJBObject, Management, Remote

public interface DomainManagement
extends 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
 Object getAttribute(String domainServerName, ObjectName name, String attribute)
          Gets the value of a specified attribute inside the mbean corresponding to the objectname name for the server with name domainServerName .
 AttributeList getAttributes(String domainServerName, ObjectName name, String[] attributes)
          Gets the values of attributes in attributes inside the mbean corresponding to the objectname name for the server with name domainServerName.
 Integer getMBeanCount(String domainServerName)
          The number of MBeans registered in the mbean server corresponding to the server domainServerName in the domain.
 MBeanInfo getMBeanInfo(String domainServerName, ObjectName name)
          Get information about a specific MBean with ObjectName name registered on server domainServerName.
 Object invoke(String domainServerName, ObjectName name, String operationName, Object[] params, String[] signature)
          Invoke an operation on an MBean with ObjectName name.
 boolean isRegistered(String domainServerName, ObjectName name)
          Check if the MBean with ObjectName name is registered in the server with the name domainServerName.
 Set queryNames(String domainServerName, ObjectName name, QueryExp query)
          Query for ObjectNames on the server named domainServerNamebased on a query string.
 void setAttribute(String domainServerName, ObjectName name, Attribute attribute)
          Sets the value of a specified attribute inside the mbean corresponding to the objectname name for the server with name domainServerName .
 AttributeList setAttributes(String domainServerName, ObjectName name, 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

Object getAttribute(String domainServerName,
                    ObjectName name,
                    String attribute)
                    throws MBeanException,
                           AttributeNotFoundException,
                           InstanceNotFoundException,
                           ReflectionException,
                           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:
MBeanException
AttributeNotFoundException
InstanceNotFoundException
ReflectionException
RemoteException

getAttributes

AttributeList getAttributes(String domainServerName,
                            ObjectName name,
                            String[] attributes)
                            throws InstanceNotFoundException,
                                   ReflectionException,
                                   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:
InstanceNotFoundException
ReflectionException
RemoteException

getMBeanCount

Integer getMBeanCount(String domainServerName)
                      throws MBeanException,
                             AttributeNotFoundException,
                             InstanceNotFoundException,
                             ReflectionException,
                             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:
MBeanException
AttributeNotFoundException
InstanceNotFoundException
ReflectionException
RemoteException

getMBeanInfo

MBeanInfo getMBeanInfo(String domainServerName,
                       ObjectName name)
                       throws IntrospectionException,
                              InstanceNotFoundException,
                              ReflectionException,
                              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:
IntrospectionException
InstanceNotFoundException
ReflectionException
RemoteException

invoke

Object invoke(String domainServerName,
              ObjectName name,
              String operationName,
              Object[] params,
              String[] signature)
              throws MBeanException,
                     InstanceNotFoundException,
                     ReflectionException,
                     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:
MBeanException
InstanceNotFoundException
ReflectionException
RemoteException

isRegistered

boolean isRegistered(String domainServerName,
                     ObjectName name)
                     throws 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:
RemoteException

queryNames

Set queryNames(String domainServerName,
               ObjectName name,
               QueryExp query)
               throws 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:
RemoteException

setAttribute

void setAttribute(String domainServerName,
                  ObjectName name,
                  Attribute attribute)
                  throws MBeanException,
                         AttributeNotFoundException,
                         InstanceNotFoundException,
                         InvalidAttributeValueException,
                         ReflectionException,
                         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:
MBeanException
AttributeNotFoundException
InstanceNotFoundException
InvalidAttributeValueException
ReflectionException
RemoteException

setAttributes

AttributeList setAttributes(String domainServerName,
                            ObjectName name,
                            AttributeList attributes)
                            throws InstanceNotFoundException,
                                   ReflectionException,
                                   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:
InstanceNotFoundException
ReflectionException
RemoteException


Copyright © 2007 OW2 Consortium. All Rights Reserved.