Package org.jboss.messaging.core.management

Provides management for JBoss Messaging

See:
          Description

Interface Summary
AcceptorControl A AcceptorMBean
AddressControl  
BridgeControl A BridgeControlMBean
BroadcastGroupControl A BroadcastGroupControlMBean
ClusterConnectionControl A ClusterConnectionControlMBean
DiscoveryGroupControl A DiscoveryGroupControlMBean
DivertControl  
ManagementService  
MessagingComponentControlMBean A MessagingComponentControlMBean
MessagingServerControl This interface describes the core management interface exposed by the server
NotificationListener A NotificationListener
NotificationService A NotificationService
QueueControl  
ReplicationOperationInvoker A ReplicationOperationInvoker
 

Class Summary
DayCounterInfo  
MessageCounterInfo  
Notification A Notification
ObjectNames A ObjectNames
ResourceNames A ResourceNames
RoleInfo  
 

Enum Summary
NotificationType  
 

Annotation Types Summary
Operation Info for a MBean Operation.
Parameter Info for a MBean Operation Parameter.
 

Package org.jboss.messaging.core.management Description

Provides management for JBoss Messaging

Usage

JBoss Messaging can be managed by sending well-formatted messages to a well-known management address. The invocation of management operations (and retrieval of management attributes) is based on JMX semantics. Managed resources are identified by ObjectNames (defined in ManagementServiceImpl.getXXXObjectName() methods).

To create a well-formatted management message, use the helper methods defined in ManagementHelper. A management message corresponds either to one operation invocation or one (or many) attribute retrievals. If a reply is expected (when the operation returns a value or when retrieving an attribute), a reply-to address must be set on the message using the ClientMessageImpl.REPLYTO_HEADER_NAME header.

Configuration

Management is configured in jbm-configuration.xml:


      <management-address>admin.management</management-address>
      <management-notification-address>admin.notification</management-notification-address>      

      <!-- true to expose JBoss Messaging resources through JMX -->
      <jmx-management-enabled>true</jmx-management-enabled>

Management using JMX

In addition to using messages, JBoss Messaging can also be managed using JMX (if the configuration property jmx-management-enabled is set to true).
JBoss Messaging is run in standalone to allow remote JMX management from the same machine (-Dcom.sun.management.jmxremote). A JMX client (e.g. jconsole) can be used locally to manage JBoss Messaging.

Design

The core of the management support in JBoss Messaging is the ManagementServiceImpl class.
This class is responsible to:

Each managed "Resources" (e.g. the server, the queues, the addresses, etc.) is managed through a ControlMBean class (the MBean is appended to make them JMX-compliant). The ControlMBean implementation handles user input validation, type conversion, etc. and delegates to the real resource.

When the ManagementService handles a management message, it uses the registry to find the corresponding ControlMBean (identified by an ObjectName set on the management message) and invoke the operation (or retrieve the attribute value) using Java reflection.

Management in a clustered environment and JMX

Using core messages to manage JBoss Messaging also works in a clustered environment: the management messages are replicated on the nodes of the cluster, ensuring that the state is replicated on all the nodes.

To allow JMX to work in a clustered environment, the MBean implementation do not delegates directly to the resources when a management operation is invoked through JMX.
Instead, the MBean implementation translates the operation invocation into a management messages which is sent from inside the server. In turn, this triggers the replication of the messages to all the nodes of the clustered. All the MBean implementations are based on the ReplicationAwareStandardMBeanWrapper which provides method to ensure a management operation is correctly replicated.

All management operation invocations which alters state are replicated, the operations without side-effect (and retrieval of attributes) are delegated directly to the resource control implementation.



Copyright © 2006 JBoss Inc. All Rights Reserved.