| 
 | BEA Systems, Inc. | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
javax.management.MBeanServerConnection interface to
 discover MBeans, attributes, and attribute types at runtime.
An interface for accessing the Managed Beans (MBeans) that WebLogic Server uses to expose its management attributes and operations.
Use this interface to retrieve any of the following:WebLogicMBean. All MBeans
 that WebLogic Server provides, except for Security MBeans,
 extend WebLogicMBean.
 
 MBean types that you create cannot extend
 WebLogicMBean. Therefore, you cannot use this
 stub to interact with MBeans based on an MBean type that
 you have created. In addition, the stub is not
 part of the JMX specification and might not be available
 on other J2EE application servers.javax.management.MBeanServer
 interface, which is described in a subsequent section of
 this introduction.
 RemoteMBeanServer, which
 extends the standard JMX javax.management.MBeanServer
  and java.rmi.Remote.
 MBeanHome interface, use the
 Helper class. Alternatively, you can
 use Environment and
 javax.naming.Context to look up this interface
 from a server instance's JNDI tree.
 
 In a WebLogic Server domain, there are two distinct behaviors
 for the MBeanHome interface:
 MBeanHome Interface
 MBeanHome InterfaceThe Local MBeanHome Interface
 Each server instance in a domain provides a local MBeanHome
 interface. You can use this local interface to retrieve a stub for
 the Runtime MBeans and Local Configuration MBeans that are registered
 on the server instance. After you retrieve the stub, you can then use
 it to invoke get, set, and other
 operations on the MBean. For example:
 
wlMBean = MBeanHome.getMBean(WebLogicObjectName)
 wlMBean.getAttribute
 wlMBean.setAttribute
 wlMBean.operationName
The Administration MBeanHome Interface
MBeanHome interface, a domain's
 Administration Server provides an additional instance of the
 MBeanHome interface. This administration MBeanHome
 interface provides type-safe access to Administration MBeans,
 all Local Configuration MBeans for all server instances in the domain,
 and all Runtime MBeans for all server instances in the domain.
 
 For example, a query for ServerRuntime MBeans on the
 administration MBeanHome returns one ServerRuntime
 MBean for each running server in the domain. The same query on the
 MBeanHome of a Managed Server (or the local MBeanHome
 of the Administration Server) returns only the ServerRuntime MBean
 for that server. For the difference between Administration, Local Configuration,
 and Runtime MBeans, refer to weblogic.management.WebLogicMBean.
 
 While the administration MBeanHome provides a convenient
 single access point for all MBeans in the domain, you must sort through
 the lookup results to find an MBean for a specific server instance. In
 addition, it uses RMI to contact MBeans on Managed Servers, which uses
 more network resources and might take longer than using a local
 MBeanHome interface.
 
The MBeanServer and RemoteMBeanServer
 Interfaces
MBeanHome interface to retrieve
 a stub, you can use it to retrieve the MBeanServer
 interface, which is the standard JMX interface for interacting with
 MBeans, or the WebLogic Server RemoteMBeanServer,
 which extends MBeanServer  and java.rmi.Remote.
 If you invoke MBean operations through these interfaces, you must use
 standard JMX techniques as described in the JMX API documentation.
 
 The MBeanServer and RemoteMBeanServer interfaces
 on a Managed Server provide access to the Local Configuration MBeans and
 Runtime MBeans for that server instance. These interfaces on an Administration
 Server provide access to the Local Configuration MBeans and Runtime MBeans
 for the Administration Server instance and to all Administration
 MBeans for the domain. These interfaces on an Administration Server do
 not provide access to Local Configuration and Runtime MBeans
 for Managed Servers.
WebLogicMBean, 
RemoteMBeanServer, 
Helper| Field Summary | |
| static String | ADMIN_JNDI_NAMEDeprecated. Represents the JNDI name of domain's administration MBeanHomeinterface. | 
| static String | JNDI_NAMEDeprecated. Part of a string that represents the JNDI name of a server's local MBeanHomeas registered in the Administration Server's
 JNDI tree. | 
| static String | LOCAL_JNDI_NAMEDeprecated. Represents the JNDI name of a server's local MBeanHomeinterface as registered in the server's own JNDI tree. | 
| Method Summary | |
|  void | addManagedHome(MBeanHome managedHome,
               String managedServerName,
               String managedURL)Deprecated. Adds managed MBeanHome to the admin mbean server. | 
|  WebLogicMBean | createAdminMBean(String name,
                 String type)Deprecated. Creates an Administration MBean with the specified name and type in the default JMX domain. | 
|  WebLogicMBean | createAdminMBean(String name,
                 String type,
                 String domain)Deprecated. Creates an Administration MBean with the specified name, type, and domain. | 
|  WebLogicMBean | createAdminMBean(String name,
                 String type,
                 String domain,
                 ConfigurationMBean parent)Deprecated. Creates an Administration MBean with the name, type, domain, and parent that you specify. | 
|  void | deleteMBean(ObjectName obj)Deprecated. Delete the MBean matching the specified ObjectName. | 
|  void | deleteMBean(WebLogicMBean mbean)Deprecated. Delete the specified MBean.. | 
|  DomainMBean | getActiveDomain()Deprecated. Returns the name of the WebLogic Server domain to which the server that is hosting this MBeanHomeinstance belongs. | 
|  ConfigurationMBean | getAdminMBean(String name,
              String type)Deprecated. Returns a type-safe stub for the Administration MBean in the default JMX domain whose JMX oject name matches the name and type values that you specify. | 
|  ConfigurationMBean | getAdminMBean(String name,
              String type,
              String domain)Deprecated. Returns a type-safe stub for the Administration MBean whose JMX object name matches the name, type, and domain value that you specify. | 
|  Set | getAllMBeans()Deprecated. Returns a type-safe stub for all MBeans that are in the default JMX domain. | 
|  Set | getAllMBeans(String domain)Deprecated. Returns a type-safe stub for all MBeans that are in the JMX domain that you specify. | 
|  ConfigurationMBean | getConfigurationMBean(String name,
                      String type)Deprecated. Returns a type-safe stub for the Local Configuration MBean in the default JMX domain whose JMX object name matches the name and type values that you specify. | 
|  String | getDomainName()Deprecated. Returns the name of the WebLogic Server domain to which the server that is hosting this MBeanHomeinstance belongs. | 
|  WebLogicMBean | getMBean(ObjectName objectName)Deprecated. Returns a type-safe stub for the MBean whose complete JMX object name is contained in the ObjectNamethat you specify. | 
|  WebLogicMBean | getMBean(String name,
         Class cls)Deprecated. Returns a type-safe stub for all MBeans in the default JMX domain that implement the class you specify. | 
|  WebLogicMBean | getMBean(String name,
         String type)Deprecated. Returns a type-safe stub for the Administration MBean in the default JMX domain whose JMX object name matches the name and type values that you specify. | 
|  WebLogicMBean | getMBean(String name,
         String type,
         String domain)Deprecated. Returns a type-safe interface for the Administration MBean whose JMX object name matches the name, type, and domain values that you specify. | 
|  WebLogicMBean | getMBean(String name,
         String type,
         String domain,
         String location)Deprecated. Returns a type-safe interface for the Runtime MBean or Local Configuration MBean whose JMX object name matches the name, type, domain, and location values that you specify. | 
|  Set | getMBeansByType(String type)Deprecated. Returns a type-safe stub for all MBeans in the default JMX domain that are an instance of a type that you specify. | 
|  RemoteMBeanServer | getMBeanServer()Deprecated. Returns the MBeanServerinterface for the server that hosts
 thisMBeanHomeinstance. | 
|  weblogic.management.runtime.RuntimeMBean | getRuntimeMBean(String name,
                String type)Deprecated. Returns a type-safe stub for a Runtime MBean in the default JMX domain whose JMX object name matches the name and type values you specify. | 
| Field Detail | 
public static final String ADMIN_JNDI_NAME
MBeanHome
 interface. The administration MBeanHome is registered only
 in the JNDI tree of the Administration Server.
public static final String JNDI_NAME
MBeanHome as registered in the Administration Server's
 JNDI tree. The Adminstration Server's JNDI tree registers the local
 MBeanHome interface of each server instance in the domain.
 
 To specify the full JNDI name of a local MBeanHome in the
 Administration Server's JNDI tree, use
 JNDI_NAME.relevantServerName .
public static final String LOCAL_JNDI_NAME
MBeanHome
 interface as registered in the server's own JNDI tree.
| Method Detail | 
public void addManagedHome(MBeanHome managedHome,
                           String managedServerName,
                           String managedURL)
managedHome - The feature to be added to the ManagedHome attributemanagedServerName - The feature to be added to the ManagedHome attributemanagedURL - The feature to be added to the ManagedHome attribute
public WebLogicMBean createAdminMBean(String name,
                                      String type)
                               throws MBeanCreationException
MBeanHome interface.
 
 The default JMX domain is defined as follows:
 weblogic.
name - A string that uniquely identifies this MBean instance.type - The interface class of which the MBean is an instance. To
             determine the value for this parameter, remove the MBean
             suffix from the interface name. For example, to create an instance
             of the interface class ServerMBean, specify
             Server.
MBeanCreationException
public WebLogicMBean createAdminMBean(String name,
                                      String type,
                                      String domain)
                               throws MBeanCreationException
MBeanHome interface.
name - A string that uniquely identifies this MBean instance.type - The interface class of which the MBean is an instance. To
               determine the value for this parameter, remove the MBean
               suffix from the interface name. For example, to create an instance
               of the interface class ServerMBean, specify
               Server.domain - The name of the JMX domain. For WebLogicMBean
               MBeans, this corresponds to the name of the current WebLogic Server
               administration domain.
               administration domain.
MBeanCreationException
public WebLogicMBean createAdminMBean(String name,
                                      String type,
                                      String domain,
                                      ConfigurationMBean parent)
                               throws MBeanCreationException
MBeanHome interface.
 
 With the exception of DomainMBean,
 all WebLogic Server MBeans are direct or indirect children of
 DomainMBean. Because this parent-child relationship applies
 to all WebLogic Server MBeans, you do not need to express it.
 Other parent-child relationships must be expressed when you create
 an MBean instance. For example, to create a
 LogMBean to
 manage the local log file of a server instance, you must use this
 method to specify the server's
 ServerMBean Administration MBean.
 If you do not specify this relationship, this method assumes that you
 want to create a LogMBean to manage the domain-wide log file.
name - A string that uniquely identifies this MBean instance.type - The interface class of which the MBean is an instance. To
               determine the value for this parameter, remove the MBean
               suffix from the interface name. For example, to create an instance
               of the interface class LogMBean, specify
               Log.domain - The name of the JMX domain. For WebLogicMBean
               MBeans, this corresponds to the name of the current WebLogic Server
               administration domain.parent - Specifies the object to which this MBean instance belongs. For
               example, to create an instance of a server-specific
               LogMBean, which configures the server-specific log file,
               specify the name of the server instance (as defined in
               ServerMBean) as the parent.
MBeanCreationException
public void deleteMBean(ObjectName obj)
                 throws InstanceNotFoundException,
                        MBeanRegistrationException
obj - 
InstanceNotFoundException
MBeanRegistrationException
public void deleteMBean(WebLogicMBean mbean)
                 throws InstanceNotFoundException,
                        MBeanRegistrationException
mbean - 
InstanceNotFoundException
MBeanRegistrationExceptionpublic DomainMBean getActiveDomain()
MBeanHome instance belongs.
public ConfigurationMBean getAdminMBean(String name,
                                        String type)
                                 throws InstanceNotFoundException
weblogic.MBeanHome interface.
name - The string that you provided when you created the associated
             resource. For example, when you create a server,
             you must provide a name for that server, such as myServer.type - The interface class of which the MBean is an instance. To
             determine the value for this parameter, remove the MBean
             suffix from the interface name. For example, for
             instances of the interface class ServerMBean, specify
             Server.
InstanceNotFoundException
public ConfigurationMBean getAdminMBean(String name,
                                        String type,
                                        String domain)
                                 throws InstanceNotFoundException
MBeanHome
 interface.
name - The string that you provided when you created the associated
               resource. For example, when you create a server,
               you must provide a name for that server, such as myServer.type - The interface class of which the MBean is an instance. To
               determine the value for this parameter, remove the MBean
               suffix from the interface name. For example, for
               instances of the interface class ServerMBean, specify
               Server.domain - The name of the JMX domain. For WebLogicMBean
               MBeans, this corresponds to the name of the current WebLogic Server
               administration domain.
InstanceNotFoundExceptionpublic Set getAllMBeans()
weblogic.
public Set getAllMBeans(String domain)
domain - The name of the JMX domain. For WebLogicMBean
               MBeans, this corresponds to the name of the current WebLogic Server
               administration domain.
public ConfigurationMBean getConfigurationMBean(String name,
                                                String type)
                                         throws InstanceNotFoundException
weblogic.Use this method to retrieve only MBeans that are direct children of DomainMBean. This method does not return MBeans that are below the first level of the MBean hierarchy.
WebLogic Server MBeans exist within a hierarchy that reflects the resources with which they are associated. DomainMBean contains only a few direct children. For example, ClusterMBean, ServerMBean, ApplicationMBean, RealmMBean, and many JDBC and JMS MBeans are direct children of DomainMBean. Most other MBeans are children of these top-level MBeans.
For example, each server instance can contain multiple execute queues. WebLogic Server
 represents this relationship by making each ExecuteQueueMBean a child of a ServerMBean.
 While you can use getConfigurationMBean to
 retrieve the ServerMBean, you cannot use the method to retrieve ExecuteQueueMBeans.
Instead, the recommended approach for retrieving child Configuration MBeans is as follows:
getConfigurationMBean) to retrieve the ServerMBean,
 ClusterMBean, or other top-level MBeans. getExecuteQueues method that retrieves all child ExecuteQueueMBeans.In some cases, parent MBeans do not provide methods that you can use to retrieve child
 MBeans. In these cases, use getMBeanByType() and iterate over the results to find
 the MBean that matches your criteria.
name - The string that you provided when you created the associated
             resource. For example, when you create a server,
             you must provide a name for that server, such as myServer.type - The interface class of which the MBean is an instance. To
             determine the value for this parameter, remove the MBean
             suffix from the interface name and append Config. For example,
             for Local Configuration instances of the interface class
             ServerMBean, specify ServerConfig.
InstanceNotFoundExceptiongetAdminMBean(java.lang.String, java.lang.String, java.lang.String)public String getDomainName()
MBeanHome instance belongs.
 
 If the MBeanHome is instantiated on a client, this method returns
 a null value.
public WebLogicMBean getMBean(ObjectName objectName)
                       throws InstanceNotFoundException
ObjectName that you specify. The
 ObjectName value may not contain wildcard characters.
objectName - The javax.management.ObjectName
                   or WebLogicObjectName
                   of the MBean
InstanceNotFoundException
public WebLogicMBean getMBean(String name,
                              Class cls)
                       throws InstanceNotFoundException
weblogic.
name - The string that you provided when you created the associated
             resource. For example, when you create a server,
             you must provide a name for that server, such as myServer.cls - A class name
InstanceNotFoundException
public WebLogicMBean getMBean(String name,
                              String type)
                       throws InstanceNotFoundException
weblogic.MBeanHome interface.
name - The string that you provided when you created the associated
             resource. For example, when you create a server,
             you must provide a name for that server, such as myServer.type - The interface class of which the named MBean is an instance. To
             determine the value for this paramter, remove the MBean
             suffix from the interface name. For example, for instances of the
             interface class ServerMBean, specify
             Server as its type.
InstanceNotFoundException
public WebLogicMBean getMBean(String name,
                              String type,
                              String domain)
                       throws InstanceNotFoundException
WebLogicObjectName and invokes the
 getMBean(ObjectName) method.
name - The string that you provided when you created the associated
               resource. For example, when you create a server,
               you must provide a name for that server, such as myServer.type - The interface class of which the named MBean is an instance. To
               determine the value for this paramter, remove the MBean suffix from the
               interface name. For example, for instances of the interface class
               ServerMBean, specify Server as its type.domain - The name of the JMX domain. For
               WebLogicMBean MBeans,
               this corresponds to the name of the current WebLogic Server
               administration domain.
InstanceNotFoundException - If there is no match to the values that
                                   you specify
public WebLogicMBean getMBean(String name,
                              String type,
                              String domain,
                              String location)
                       throws InstanceNotFoundException
WeblogicObjectName and invokes getMBean(ObjectName).
name - The string that you provided when you created the associated
                 resource. For example, when you create a server,
                 you must provide a name for that server, such as myServer.type - The interface class of which the MBean is an instance. To
                 determine the value for this parameter, remove the MBean
                 suffix from the interface name. For example, for instances of the
                 ServerRuntimeMBean class, specify ServerRuntime.
                 For Local Configuration MBeans, append Config. For example,
                 for Local Configuration instances of the ServerMBean class,
                 specify ServerConfig.domain - The name of the JMX domain. For WebLogicMBean MBeans,
                 this corresponds to the name of the current WebLogic Server
                 administration domain.location - The name of the server instance on which the MBean instance resides.
InstanceNotFoundException - If there is no match to the values that
                                   you specifypublic Set getMBeansByType(String type)
weblogic.
type - The interface class of which the MBean is an instance. To
             determine the value for this parameter, remove the MBean
             suffix from the interface name. For Local Configuration MBeans, append
             Config. For example, for Local Configuration instances of the
             interface class ServerMBean, specify ServerConfig as
             its type. For Administration instances, specify Server.
             For an instance of the ServerRuntimeMBean class, specify
             ServerRuntime.
public RemoteMBeanServer getMBeanServer()
MBeanServer interface for the server that hosts
 this MBeanHome instance.
 
 For example, if you retrieve the local MBeanHome interface for
 a server named MS1, then this method returns the MBeanServer
 interface for MS1. If you retrieve the administration MBeanHome,
 this method returns the MBeanServer interface for the
 the Administration Server.
MBeanServer interface
public weblogic.management.runtime.RuntimeMBean getRuntimeMBean(String name,
                                                                String type)
                                                         throws InstanceNotFoundException
weblogic.Use this method to retrieve only MBeans that are direct children of ServerRuntimeMBean. This method does not return MBeans that are below the first level of the MBean hierarchy.
WebLogic Server MBeans exist within a hierarchy that reflects the resources with which they are associated. ServerRuntimeMBean is the root of the runtime hierarchy. It contains only a few direct children. For example, ClusterRuntimeMBean, and many JDBC and JMS MBeans are direct children of ServerRuntimeMBean. Most other MBeans are children of these top-level MBeans.
The recommended approach for retrieving child Runtime MBeans is as follows:
In some cases, parent MBeans do not provide methods that you can use to retrieve child
 MBeans. In these cases, use getMBeanByType() and iterate over the results to find
 the MBean that matches your criteria.
name - The string that you provided when you created the associated
             resource. For example, when you create a server,
             you must provide a name for that server, such as myServer.type - The interface class of which the MBean is an instance. To
             determine the value for this parameter, remove the MBean
             suffix from the interface name. For example, for an instance of the
             ServerRuntimeMBean class, specify ServerRuntime.
InstanceNotFoundExceptiongetAdminMBean(java.lang.String, java.lang.String, java.lang.String)| 
 | Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs90 Copyright 2005 BEA Systems Inc. | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||