# RuntimeServiceMBean

Overview | Related MBeans | Attributes | Operations

## Overview

Provides an entry point for navigating the hierarchy of WebLogic Server runtime MBeans and active configuration MBeans for the current server.

Each server instance in a domain provides its own instance of this MBean.

The `javax.management.ObjectName` of this MBean is "`com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean`".

This is the only object name that a JMX client needs to navigate the hierarchy available from this MBean. To start navigating, a JMX client invokes the `javax.management.MBeanServerConnection.getAttribute()` method and passes the following as parameters:

- The `ObjectName` of this service MBean

- A `String` representation for the name of an attribute in this MBean that contains the root of an MBean hierarchy

This method call returns the `ObjectName` for the root MBean. To access MBeans below the root, the JMX client passes the root MBean's `ObjectName` and the name of a root MBean attribute that contains a child MBean to the `MBeanServerConnection.getAttribute()` method. This method call returns the `ObjectName` of the child MBean.

For example:
`ObjectName rs = new ObjectName("com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean");`
`// Get the ObjectName of the server's ServerRuntimeMBean by getting the value
// of the RuntimeServiceMBean ServerRuntime attribute
ObjectName serverrt =
(ObjectName) MBeanServerConnection.getAttribute(rs,"ServerRuntime");
// Get the ObjectNames for all ApplicationRuntimeMBeans on the server by getting
// the value of the ServerRuntimeMBean ApplicationRuntimes attribute
ObjectName[] apprt =
(ObjectName[]) MBeanServerConnection.getAttribute(serverrt, "ApplicationRuntimes");`

Since | 9.0.0.0
Fully Qualified Interface Name | If you use the `getMBeanInfo` operation in MBeanTypeServiceMBean, supply the following value as this MBean's fully qualified interface name: `weblogic.management.mbeanservers.runtime.RuntimeServiceMBean`
Factory Methods | No factory methods. Instances of this MBean are created automatically.
Access Points Inherited from Service | Because this MBean extends or implements Service, you can also access this MBean by retrieving Services. The following attributes contain Services and its subtypes:
RuntimeServiceMBean.Services |

## Related MBeans

This section describes attributes that provide access to other MBeans. For more information about the MBean hierarchy, refer to WebLogic Server MBean Data Model.

DomainConfiguration ServerConfiguration ServerRuntime | Services

### DomainConfiguration

Contains the active `DomainMBean` for the current WebLogic Server domain.

Get this MBean to learn about the active configuration of all servers and resources in the domain.

Note:

  The `DomainMBean` that can be accessed from this (`RuntimeServiceMBean`) MBean attribute represents the active configuration of the domain and cannot be edited. The pending `DomainMBean`, which can be edited, is available only from the Edit MBean Server and its `EditServiceMBean`.

Factory Methods | No explicit creator method. The child shares the lifecycle of its parent.
Privileges | Read only
Type | DomainMBean
Relationship type: | Containment.

### ServerConfiguration

Contains the active `ServerMBean` for the current server instance.

Get this MBean to learn about the configuration of the current server, including any values that were overridden by the server's startup command.

Note:

  The `ServerMBean` that can be accessed from this (`RuntimeServiceMBean`) MBean attribute represents the active configuration of the server and cannot be edited.

Factory Methods | No explicit creator method. The child shares the lifecycle of its parent.
Privileges | Read only
Type | ServerMBean
Relationship type: | Containment.

### ServerRuntime

Contains `ServerRuntimeMBean` for the current server.

The `ServerRuntimeMBean` is the root of runtime MBean hierarchy for this server instance. Each runtime MBean in the hierarchy provides access to the server's status and control as well as statistical information about any deployed or configured service on the server.

Factory Methods | No explicit creator method. The child shares the lifecycle of its parent.
Privileges | Read only
Type | ServerRuntimeMBean
Relationship type: | Containment.

### Services

Returns all the services that do not have a parent i.e all the root services

Factory Methods | No explicit creator method. The child shares the lifecycle of its parent.
Privileges | Read only
Type | Service[]
Relationship type: | Containment.

## Attributes

This section describes the following attributes:

Name ParentService ServerName | Type

### Name

A unique key that WebLogic Server generates to identify the current instance of this MBean type.

For a singleton, such as `DomainRuntimeServiceMBean`, this key is often just the bean's short class name.

Privileges | Read only
Type | java.lang.String

### ParentService

The MBean that created the current MBean instance.

In the data model for WebLogic Server MBeans, an MBean that creates another MBean is called a parent. MBeans at the top of the hierarchy have no parents.

Privileges | Read only
Type | weblogic.management.provider.Service

### ServerName

The name of the current WebLogic Server instance as defined in the domain configuration.

Privileges | Read only
Type | java.lang.String

### Type

The MBean type for this instance. This is useful for MBean types that support multiple intances, such as `ActivationTaskMBean`.

Privileges | Read only
Type | java.lang.String

## Operations

This section describes the following operations:

findConfiguration findRuntime | findService

### findConfiguration

Enables a JMX client to retrieve configuration data for a specific instance of a resource. To use this operation, a JMX client passes a single runtime MBean and the operation returns the active configuration MBean for the resource.

For example, given the `JMSServerRuntimeMBean` for a JMS server named "JS1" on the current server instance, this operation returns the active `JMSServerMBean` for "JS1."

Operation Name | `"findConfiguration"`
Parameters | `Object [] { runtimeMBean }` where: `runtimeMBean` is an object of type `weblogic.management.runtime.RuntimeMBean` that specifies: runtimeMBean
Signature | `String [] { "weblogic.management.runtime.RuntimeMBean" }`
Returns | `DescriptorBean`

### findRuntime

Enables a JMX client to retrieve monitoring statistics for a specified resource on the current server. To use this operation, a JMX client passes a single configuration MBean. The operation returns the corresponding runtime MBean for the resource on the current server.

For example, given the `JMSServerMBean` for a JMS server named "JS1" on a the current server, this operation returns the `JMSServerRuntimeMBean` for "JS1."

Operation Name | `"findRuntime"`
Parameters | `Object [] { configurationMBean }` where: `configurationMBean` is an object of type `weblogic.descriptor.DescriptorBean` that specifies: configurationMBean
Signature | `String [] { "weblogic.descriptor.DescriptorBean" }`
Returns | `RuntimeMBean`

### findService

Enables client to retrieve a specific named service

Operation Name | `"findService"`
Parameters | `Object [] { }` where:
Signature | `String [] { "java.lang.String", "java.lang.String" }`
Returns | `Service`