BEA Systems, Inc.

WebLogic Server 8.1 API Reference

weblogic.management
Interface MBeanHome


public interface MBeanHome
extends java.rmi.Remote

There are 2 interfaces to access MBeans:

MBeanServer - Each WebLogic Server contains an MBeanServer. The MBeanServer contains all MBeans for its host WebLogic Server. Using the JMX API, MBean attribute values can be retrieved and other JMX operations can be performed on MBeans in the MBeanServer.

MBeanHome - Each WebLogic Server publishes an MBeanHome, which is a wrapper on it MBeanServer, exposing a strongly-typed interface. MBeanServer and MBeanHome provide access to the same set of MBeans in a given server. Each server in a domain contains an MBeanHome (and a corresponding MBeanServer), which hosts configuration and runtime MBeans on that server.

Administration(or Admin) MBeanHome

In addition to the regular MBeanHome, the Administration server has an administration MBeanHome that provides access to all MBeans in the entire domain. It also implements this interface. The only difference is in the set of mbeans it hosts.

The Administration MBeans reside only on the Administration Server, and are only available through the Administration MBeanHome. For the difference between Administration, Configuration and Runtime MBeans, please see weblogic.management.WebLogicMBean

For example, a query for MBeans on the Administration MBeanHome returns one MBean for each running server in the domain. The same query on the MBeanHome of a Managed Server (or the regular MBeanHome of the Administration Server) returns only the MBeans for that server. While MBeanHome is local (and serializable), the underlying MBeanServer is remote.

Author:
Copyright © 2002 BEA Systems, Inc. All Rights Reserved.
See Also:
WebLogicMBean, MBeanServer, Helper

Field Summary
static java.lang.String ADMIN_JNDI_NAME
          The JNDI name used to access the domainwide administration MBeanHome from the JNDI tree of the admin server.
static java.lang.String JNDI_NAME
          The JNDI name used to lookup the MBeanHome of a given server in the JNDI tree of the admin server.
static java.lang.String LOCAL_JNDI_NAME
          The JNDI name used to access local MBeanHome of a given server from that servers JNDI tree.
 
Method Summary
 void addManagedHome(MBeanHome managedHome, java.lang.String managedServerName, java.lang.String managedListenAddress, int managedListenPort, java.lang.String isListenPortSecure)
          Adds managed MBeanHome to the admin mbean server.
 WebLogicMBean createAdminMBean(java.lang.String name, java.lang.String type)
          Create an Admin MBean with the specified name and type in the current domain.
 WebLogicMBean createAdminMBean(java.lang.String name, java.lang.String type, java.lang.String domain)
          Create an Admin MBean with the specified name, type, and domain.
 WebLogicMBean createAdminMBean(java.lang.String name, java.lang.String type, java.lang.String domain, ConfigurationMBean parent)
          Create an Admin MBean with the specified name, type, domain and parent.
 DomainMBean getActiveDomain()
          Return the Active Domain
 ConfigurationMBean getAdminMBean(java.lang.String name, java.lang.String type)
          Return the Admin MBean matching a given name and type for the current domain.
 ConfigurationMBean getAdminMBean(java.lang.String name, java.lang.String type, java.lang.String domain)
          Return the Admin MBean matching a give name, type and domain.
 java.util.Set getAllMBeans()
          Return all the mbeans.
 java.util.Set getAllMBeans(java.lang.String domain)
          Return all the mbeans for the specified domain.
 ConfigurationMBean getConfigurationMBean(java.lang.String name, java.lang.String type)
          Return the Configuration MBean matching a given name and type in the current domain.
 java.lang.String getDomainName()
          Return the domain name of the server on which this home was originally instantiated.
 WebLogicMBean getMBean(javax.management.ObjectName objectName)
          Return the MBean with the specified objectName.
 WebLogicMBean getMBean(java.lang.String name, java.lang.Class cls)
          Return the MBean with the specified name that implements the specified class in the active domain.
 WebLogicMBean getMBean(java.lang.String name, java.lang.String type)
          Return the Admin MBean with the specified name and type in the default domain.
 WebLogicMBean getMBean(java.lang.String name, java.lang.String type, java.lang.String domain)
          Return the MBean with the specified name and type in the specified domain.
 WebLogicMBean getMBean(java.lang.String name, java.lang.String type, java.lang.String domain, java.lang.String location)
          Return the MBean with the specified name,type,location in the domain.
 java.util.Set getMBeansByClass(java.lang.Class cls)
          Return all the MBeans that implement a particular class in the active domain.
 java.util.Set getMBeansByClass(java.lang.Class cls, java.lang.String domain)
          Return all the MBeans that implement a particular class in the specified domain.
 java.util.Set getMBeansByClass(java.lang.Class cls, WebLogicMBean parent)
          Return all the MBeans that implement a particular class and which have the given MBean as their parent.
 java.util.Set getMBeansByType(java.lang.String type)
          Return all mbeans of a particular type in all domains.
 java.util.Set getMBeansByType(java.lang.String type, java.lang.String domain)
          Return all mbeans of a particular type the in the specified domain.
 RemoteMBeanServer getMBeanServer()
          Return the MBean Server associated with this MBeanHome
 weblogic.management.runtime.RuntimeMBean getRuntimeMBean(java.lang.String name, java.lang.String type)
          Return the runtime MBean matching a given name and type in the current domain.
 void registerConfigMBeansForAdminChanges(java.util.List configMbeanPairList, javax.management.MBeanServer remoteMBeanServer)
          Description of the Method
 void unRegisterConfigMBeansForAdminChanges(java.util.List configMbeanPairList, java.lang.String msName)
          Description of the Method
 

Field Detail

JNDI_NAME

public static final java.lang.String JNDI_NAME
The JNDI name used to lookup the MBeanHome of a given server in the JNDI tree of the admin server. MBeanHome is available at JNDI_NAME+"."+relevantServerName

LOCAL_JNDI_NAME

public static final java.lang.String LOCAL_JNDI_NAME
The JNDI name used to access local MBeanHome of a given server from that servers JNDI tree.

ADMIN_JNDI_NAME

public static final java.lang.String ADMIN_JNDI_NAME
The JNDI name used to access the domainwide administration MBeanHome from the JNDI tree of the admin server.
Method Detail

getMBeanServer

public RemoteMBeanServer getMBeanServer()
Return the MBean Server associated with this MBeanHome

Returns:
The mBeanServer value

getMBean

public WebLogicMBean getMBean(javax.management.ObjectName objectName)
                       throws javax.management.InstanceNotFoundException
Return the MBean with the specified objectName. The object name may not contain any wildcard, since only a single bean is to be returned.

Parameters:
objectName - The unique WeblogicObjectName of the Bean.
Returns:
The mBean value
Throws:
javax.management.InstanceNotFoundException - Description of the Exception

getMBean

public WebLogicMBean getMBean(java.lang.String name,
                              java.lang.String type,
                              java.lang.String domain,
                              java.lang.String location)
                       throws javax.management.InstanceNotFoundException
Return the MBean with the specified name,type,location in the domain. This is convenience method that builds a WeblogicObjectName and invokes #getMBean(ObjectName)

Parameters:
name - Unique within type, domain, and location
type - The type of the MBean (i.e. Server, ServerConfig)
domain - The WebLogic Domain (which is the same as the JMX domain)
location - The name of the server on which the MBean resides
Returns:
A type safe interface to an MBean that extends WebLogicMBean
Throws:
javax.management.InstanceNotFoundException - If an MBean with the specified name is not registered

getMBean

public WebLogicMBean getMBean(java.lang.String name,
                              java.lang.String type,
                              java.lang.String domain)
                       throws javax.management.InstanceNotFoundException
Return the MBean with the specified name and type in the specified domain. Since no location is specified the method will by definition return the Admin MBean.

Parameters:
name - Unique within type, domain, and location
type - The type of the MBean (i.e. Server, ServerConfig)
domain - The WebLogic Domain (which is the same as the JMX domain)
Returns:
The mBean value
Throws:
javax.management.InstanceNotFoundException - Description of the Exception

getMBean

public WebLogicMBean getMBean(java.lang.String name,
                              java.lang.String type)
                       throws javax.management.InstanceNotFoundException
Return the Admin MBean with the specified name and type in the default domain. The default domain is defined to be the current domain if you are running in the context of a Weblogic Server and the domain "weblogic" if you are running from a client.

Parameters:
name - Description of the Parameter
type - Description of the Parameter
Returns:
The mBean value
Throws:
javax.management.InstanceNotFoundException - Description of the Exception

getMBean

public WebLogicMBean getMBean(java.lang.String name,
                              java.lang.Class cls)
                       throws javax.management.InstanceNotFoundException
Return the MBean with the specified name that implements the specified class in the active domain. Searching by by class is very inefficient and should be avoided.

Parameters:
name - The name of the MBean which must be unique for that class.
cls - Description of the Parameter
Returns:
The mBean value
Throws:
javax.management.InstanceNotFoundException - Description of the Exception

getMBeansByType

public java.util.Set getMBeansByType(java.lang.String type,
                                     java.lang.String domain)
Return all mbeans of a particular type the in the specified domain.

Parameters:
type - Description of the Parameter
domain - Description of the Parameter
Returns:
The mBeansByType value

getMBeansByType

public java.util.Set getMBeansByType(java.lang.String type)
Return all mbeans of a particular type in all domains.

Parameters:
type - Description of the Parameter
Returns:
The mBeansByType value

getMBeansByClass

public java.util.Set getMBeansByClass(java.lang.Class cls)
Return all the MBeans that implement a particular class in the active domain.

Parameters:
cls - Description of the Parameter
Returns:
The mBeansByClass value

getMBeansByClass

public java.util.Set getMBeansByClass(java.lang.Class cls,
                                      WebLogicMBean parent)
Return all the MBeans that implement a particular class and which have the given MBean as their parent.

Parameters:
cls - Description of the Parameter
parent - Description of the Parameter
Returns:
The mBeansByClass value

getMBeansByClass

public java.util.Set getMBeansByClass(java.lang.Class cls,
                                      java.lang.String domain)
Return all the MBeans that implement a particular class in the specified domain.

Parameters:
cls - Description of the Parameter
domain - Description of the Parameter
Returns:
The mBeansByClass value

getAllMBeans

public java.util.Set getAllMBeans(java.lang.String domain)
Return all the mbeans for the specified domain.

Parameters:
domain - Description of the Parameter
Returns:
The allMBeans value

getAllMBeans

public java.util.Set getAllMBeans()
Return all the mbeans.

Returns:
The allMBeans value

getActiveDomain

public DomainMBean getActiveDomain()
Return the Active Domain

Returns:
The activeDomain value

getAdminMBean

public ConfigurationMBean getAdminMBean(java.lang.String name,
                                        java.lang.String type,
                                        java.lang.String domain)
                                 throws javax.management.InstanceNotFoundException
Return the Admin MBean matching a give name, type and domain. An Admin MBean is an MBean that is part of the the persistent configuration of the Domain. This call will only work if this MBean Home is the Admin Server's. The type of an Admin MBean is like the name of its MBean interface, without the package name or the MBean suffix. For example: Server, Cluster, Machine, etc.

Parameters:
name - Description of the Parameter
type - Description of the Parameter
domain - Description of the Parameter
Returns:
The adminMBean value
Throws:
javax.management.InstanceNotFoundException - Description of the Exception

getAdminMBean

public ConfigurationMBean getAdminMBean(java.lang.String name,
                                        java.lang.String type)
                                 throws javax.management.InstanceNotFoundException
Return the Admin MBean matching a given name and type for the current domain. An Admin MBean is an MBean that is part of the the persistent configuration of the Domain. This call will only work if this MBean Home is the Admin Server's. The type of an Admin MBean is like the name of its MBean interface, without the package name or the MBean suffix. For example: Server, Cluster, Machine, etc.

Parameters:
name - Description of the Parameter
type - Description of the Parameter
Returns:
The adminMBean value
Throws:
javax.management.InstanceNotFoundException - Description of the Exception

getConfigurationMBean

public ConfigurationMBean getConfigurationMBean(java.lang.String name,
                                                java.lang.String type)
                                         throws javax.management.InstanceNotFoundException
Return the Configuration MBean matching a given name and type in the current domain. A Configuration MBean is a local version of an Admin MBean. Configuration MBeans usually have an Admin equivalent, and if they do they are automatically updated everytime a dynamic change takes place on the Admin MBean. The type of a Configuration MBean is Config. For example: ServerConfig, WebAppComponentConfig, etc.

Parameters:
name - Description of the Parameter
type - Description of the Parameter
Returns:
The configurationMBean value
Throws:
javax.management.InstanceNotFoundException - Description of the Exception
See Also:
getAdminMBean(java.lang.String, java.lang.String, java.lang.String)

getRuntimeMBean

public weblogic.management.runtime.RuntimeMBean getRuntimeMBean(java.lang.String name,
                                                                java.lang.String type)
                             throws javax.management.InstanceNotFoundException
Return the runtime MBean matching a given name and type in the current domain. A runtime MBean is a local MBean that gives runtime information about the various Server and Application components. The type of a Runtime MBean is Runtime. For example: ServerRuntime, ClusterRuntime, etc.

Parameters:
name - Description of the Parameter
type - Description of the Parameter
Returns:
The runtimeMBean value
Throws:
javax.management.InstanceNotFoundException - Description of the Exception
See Also:
getAdminMBean(java.lang.String, java.lang.String, java.lang.String)

createAdminMBean

public WebLogicMBean createAdminMBean(java.lang.String name,
                                      java.lang.String type,
                                      java.lang.String domain,
                                      ConfigurationMBean parent)
                               throws MBeanCreationException
Create an Admin MBean with the specified name, type, domain and parent. An Admin MBean is an MBean that is part of the persistent configuration of the Domain. This call will only work if this MBean Home is the Admin Server's. The type of an Admin MBean is like the name of its MBean interface, without the package name or the MBean suffix. For example: Server, Cluster, Machine, etc.

Parameters:
name - Description of the Parameter
type - Description of the Parameter
domain - Description of the Parameter
parent - Description of the Parameter
Returns:
Description of the Return Value
Throws:
MBeanCreationException - Description of the Exception

createAdminMBean

public WebLogicMBean createAdminMBean(java.lang.String name,
                                      java.lang.String type,
                                      java.lang.String domain)
                               throws MBeanCreationException
Create an Admin MBean with the specified name, type, and domain. An Admin MBean is an MBean that is part of the the persistent configuration of the Domain. This call will only work if this MBean Home is the Admin Server's. The type of an Admin MBean is like the name of its MBean interface, without the package name or the MBean suffix. For example: Server, Cluster, Machine, etc.

Parameters:
name - Description of the Parameter
type - Description of the Parameter
domain - Description of the Parameter
Returns:
Description of the Return Value
Throws:
MBeanCreationException - Description of the Exception

createAdminMBean

public WebLogicMBean createAdminMBean(java.lang.String name,
                                      java.lang.String type)
                               throws MBeanCreationException
Create an Admin MBean with the specified name and type in the current domain. An Admin MBean is an MBean that is part of the the persistent configuration of the Domain. This call will only work if this MBean Home is the Admin Server's. The type of an Admin MBean is like the name of its MBean interface, without the package name or the MBean suffix. For example: Server, Cluster, Machine, etc.

Parameters:
name - Description of the Parameter
type - Description of the Parameter
Returns:
Description of the Return Value
Throws:
MBeanCreationException - Description of the Exception

addManagedHome

public void addManagedHome(MBeanHome managedHome,
                           java.lang.String managedServerName,
                           java.lang.String managedListenAddress,
                           int managedListenPort,
                           java.lang.String isListenPortSecure)
Adds managed MBeanHome to the admin mbean server.

Parameters:
managedHome - The feature to be added to the ManagedHome attribute
managedServerName - The feature to be added to the ManagedHome attribute
managedListenAddress - The feature to be added to the ManagedHome attribute
managedListenPort - The feature to be added to the ManagedHome attribute
isListenPortSecure - The feature to be added to the ManagedHome attribute

getDomainName

public java.lang.String getDomainName()
Return the domain name of the server on which this home was originally instantiated. It will be null if the home is instantiated on a client.

Returns:
The domainName value

registerConfigMBeansForAdminChanges

public void registerConfigMBeansForAdminChanges(java.util.List configMbeanPairList,
                                                javax.management.MBeanServer remoteMBeanServer)
Description of the Method

Parameters:
configMbeanPairList - Description of the Parameter
RMBS - Description of the Parameter

unRegisterConfigMBeansForAdminChanges

public void unRegisterConfigMBeansForAdminChanges(java.util.List configMbeanPairList,
                                                  java.lang.String msName)
Description of the Method

Parameters:
configMbeanPairList - Description of the Parameter

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs81b