The Life Cycle of WebLogic Server MBeans

2-2 Developing Custom Management Utilities With JMX for Oracle WebLogic Server ■ Configuration MBeans contain information about the configuration of servers and resources. They represent the information that is stored in the domains XML configuration documents. ■ Configuration MBeans for system modules contain information about the configuration of services such as JDBC data sources and JMS topics that have been targeted at the system level. Instead of targeting these services at the system level, you can include services as modules within an application. These application-level resources share the life cycle and scope of the parent application. However, WebLogic Server does not provide MBeans for application modules. See Supported Deployment Units in Deploying Applications to Oracle WebLogic Server.

2.3 The Life Cycle of WebLogic Server MBeans

The life cycle of a run-time MBean follows that of the resource for which it exposes run-time data. For example, when you start a server instance, the server instantiates a ServerRuntimeMBean and populates it with the current run-time data. Each resource updates the data in its run-time MBean as its state changes. The resource destroys its run-time MBeans when it is stopped. For a configuration MBean, the life cycle is as follows: 1. Each server in the domain has its own copy of the domains configuration documents which consist of a config.xml file and subsidiary files. During a servers startup cycle, it contacts the Administration Server to update its configuration files with any changes that occurred while it was shut down. Then it instantiates configuration MBeans to represent the data in the configuration documents. See Figure 2–1 . Figure 2–1 Initializing Configuration MBeans on Administration Server Note: By default, a Managed Server will start even if it cannot contact the Administration Server to update its configuration files. This default setting creates the possibility that Managed Servers across the domain might run with inconsistent configurations. For information about changing this default, see Starting a Managed Server When the Administration Server Is Not Accessible in Managing Server Startup and Shutdown for Oracle WebLogic Server. Understanding WebLogic Server MBeans 2-3 The configuration MBeans enable each server instance in the domain to have an identical in-memory representation of the domains configuration. 2. To control changes to the domains configuration, JMX clients have read-only access to these configuration MBeans. The Administration Server maintains a separate, editable copy of the domains configuration documents in the domains configpending directory. It uses the data in these pending documents to instantiate a set of configuration MBeans that JMX clients can modify. After a JMX client modifies one of these configuration MBeans, the client directs the Administration Server to save the modifications in the pending configuration documents. Then the client starts a transactional process that updates the read-only configuration documents and configuration MBeans for all server instances in the domain. For more information, see Managing Configuration Changes in Understanding Domain Configuration for Oracle WebLogic Server. 3. Configuration MBeans are destroyed when you shut down the server instance that hosts them.

2.4 WebLogic Server MBean Data Model