The broker monitor MBean is used for monitoring a message broker. There is one such MBean for each broker.
The broker monitor MBean has the following object name:
com.sun.messaging.jms.server:type=Broker,subtype=Monitor
A string representing this object name is defined as a static constant BROKER_MONITOR_MBEAN_NAME in the utility class MQObjectName.
The broker monitor MBean has the attributes shown in Table 3–4. The names of these attributes are defined as static constants in the utility class BrokerAttributes.
Table 3–4 Broker Monitor Attributes
Name |
Type |
Settable? |
Description |
---|---|---|---|
String |
No |
Must be unique; no two running brokers may have the same broker identifier. For brokers using a JDBC-based persistent data store, this string is appended to the names of all database tables to make them unique when more than one broker instance is using the same database. Must be an alphanumeric string of no more than n - 13 characters, where n is the maximum table name length allowed by the database. If a database is not used as the persistent data store, the value of this attribute is null. Note – For high-availability brokers, database table names use the ClusterID attribute (see Table 3–78) instead. |
|
String |
No |
Broker version |
|
String |
No |
Broker instance name |
|
Integer |
No |
Port number of Port Mapper |
|
Boolean |
No |
Is broker embedded (started from within another process)? |
The broker monitor MBean supports the notifications shown in Table 3–5. These notifications are instances of the Message Queue JMX classes BrokerNotification and ClusterNotification, and their names are defined as static constants in those classes.
Table 3–5 Broker Monitor Notifications
Name |
Utility Constant |
Description |
---|---|---|
Broker has begun shutting down |
||
Broker has begun quiescing |
||
Broker has finished quiescing |
||
Broker has begun taking over persistent data store from another broker |
||
Broker has finished taking over persistent data store from another broker |
||
Attempted takeover has failed |
||
Broker has joined a cluster |
Table 3–6 shows the methods defined in class BrokerNotification for obtaining details about a broker monitor notification. See Table 3–83 for the corresponding methods of class ClusterNotification.
Table 3–6 Data Retrieval Methods for Broker Monitor Notifications
Method |
Result Type |
Description |
---|---|---|
String | ||
String |
Broker address, in the form hostName:portNumber Example: host1:3000 |
|
String |