Chapter 3 Message Queue MBean Reference
This chapter describes the JMX MBeans that allow you to configure
and monitor a Message Queue broker. It consists of the following sections:
Message Brokers
This section describes the MBeans used for managing message brokers:
The following subsections describe each of these MBeans in detail.
Broker Configuration
The broker configuration MBean is used for configuring
a message broker. There is one such MBean for each broker.
Object Name
The broker configuration MBean has the following object name:
com.sun.messaging.jms.server:type=Broker,subtype=Config
A string representing this object name is defined as a static constant BROKER_CONFIG_MBEAN_NAME in the utility class MQObjectName.
Attributes
The broker configuration MBean has the attributes shown in Table 3–1. The names of these attributes are
defined as static constants in the utility class BrokerAttributes.
Table 3–1 Broker Configuration Attributes
|
Name
|
Type
|
Settable?
|
Description
|
|
BrokerID
|
String
|
No
|
Broker identifier
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–74) instead.
|
|
Version
|
String
|
No
|
Broker version
|
|
InstanceName
|
String
|
No
|
Broker instance name
Example:
|
|
Port
|
Integer
|
Yes
|
Port number of Port Mapper
|
Operations
The broker configuration MBean supports the operations shown in Table 3–2. The names of these operations are
defined as static constants in the utility class BrokerOperations.
Table 3–2 Broker Configuration Operations
|
Name
|
Parameters
|
Result Type
|
Description
|
|
shutdown
|
nofailover (Boolean)
time (Long)
|
None
|
Shut down broker
If nofailover is false or null, another broker will attempt to take over for this broker
when it shuts down; this applies only to brokers in a high-availability (HA) cluster. If nofailover is true, no such takeover attempt will occur.
The time parameter specifies the interval, in
seconds, before the broker actually shuts down; for immediate shutdown, specify 0 or null.
|
|
shutdown
|
None
|
None
|
Shut down broker immediately
If the broker is part of a high-availability
(HA) cluster, another broker will attempt to take over
for it.
Equivalent to shutdown(Boolean.FALSE, new Long(0)).
|
|
restart
|
None
|
None
|
Restart broker
|
|
quiesce
|
None
|
None
|
Quiesce broker
The broker will refuse any new connections; existing connections will
continue to be served.
|
|
unquiesce
|
None
|
None
|
Unquiesce broker
The broker will again accept new connections.
|
|
takeover [HA clusters only]
|
brokerID (String)
|
None
|
Initiate takeover from specified broker
The desired broker is designated by its broker identifier (brokerID).
|
|
resetMetrics
|
None
|
None
|
Reset metrics
Resets to zero all metrics in monitor MBeans that track cumulative,
peak, or average counts. The following attributes are affected:
|
|
|
|
|
Service monitor
NumConnectionsOpened
NumConnectionsRejected
NumMsgsIn
NumMsgsOut
MsgBytesIn
MsgBytesOut
NumPktsIn
NumPktsOut
PktBytesIn
PktBytesOut
|
|
|
|
|
Service manager monitor
NumMsgsIn
NumMsgsOut
MsgBytesIn
MsgBytesOut
NumPktsIn
NumPktsOut
PktBytesIn
PktBytesOut
|
|
|
|
|
Connection manager monitor
NumConnectionsOpened
NumConnectionsRejected
|
|
|
|
|
Destination monitor
PeakNumConsumers
AvgNumConsumers
PeakNumActiveConsumers
AvgNumActiveConsumers
PeakNumBackupConsumers
AvgNumBackupConsumers
PeakNumMsgs
AvgNumMsgs
NumMsgsIn
NumMsgsOut
MsgBytesIn
MsgBytesOut
PeakMsgBytes
PeakTotalMsgBytes
AvgTotalMsgBytes
|
|
|
|
|
Transaction manager monitor
NumTransactionsCommitted
NumTransactionsRollback
|
Notification
The broker configuration MBean supports the notification shown in Table 3–3.
Table 3–3 Broker Configuration Notification
|
Name
|
Description
|
|
jmx.attribute.change
|
Attribute value changed
|
Broker Monitor
The broker monitor MBean is used for monitoring
a message broker. There is one such MBean for each broker.
Object Name
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.
Attributes
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
|
|
BrokerID
|
String
|
No
|
Broker identifier
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.
|
|
Version
|
String
|
No
|
Broker version
|
|
InstanceName
|
String
|
No
|
Broker instance name
|
|
Port
|
Integer
|
No
|
Port number of Port Mapper
|
|
Embedded
|
Boolean
|
No
|
Is broker embedded (started from within another process)?
|
Notifications
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
|
|
mq.broker.shutdown.start
|
BrokerNotification.BROKER_SHUTDOWN_START
|
Broker has begun shutting down
|
|
mq.broker.quiesce.start
|
BrokerNotification.BROKER_QUIESCE_START
|
Broker has begun quiescing
|
|
mq.broker.quiesce.complete
|
BrokerNotification.BROKER_QUIESCE_COMPLETE
|
Broker has finished quiescing
|
|
mq.broker.takeover.start [HA clusters only]
|
BrokerNotification.BROKER_TAKEOVER_START
|
Broker has begun taking over persistent data store from another broker
|
|
mq.broker.takeover.complete
|
BrokerNotification.BROKER_TAKEOVER_COMPLETE
|
Broker has finished taking over persistent data store from another broker
|
|
mq.broker.takeover.fail
|
BrokerNotification.BROKER_TAKEOVER_FAIL
|
Attempted takeover has failed
|
|
mq.cluster.broker.join
|
ClusterNotification.CLUSTER_BROKER_JOIN
|
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
|
|
getBrokerID
|
String
|
Broker identifier
|
|
getBrokerAddress
|
String
|
Broker address, in the form hostName:portNumber
Example:
|
|
getFailedBrokerID [HA clusters only]
|
String
|
Broker identifier of broker being taken over
|
Connection Services
This section describes the MBeans used for managing connection services:
-
The service configuration MBean configures a connection service.
-
The service monitor MBean monitors a connection service.
-
The service manager configuration MBean manages service configuration
MBeans.
-
The service manager monitor MBean manages service monitor
MBeans.
The following subsections describe each of these MBeans in detail.
Service Configuration
The service configuration MBean is used for configuring
a connection service. There is one such MBean for each service.
Object Name
The service configuration MBean has an object name of the following
form:
com.sun.messaging.jms.server:type=Service,subtype=Config,name=serviceName
where serviceName is the name of the connection
service (see Table 3–7). The utility
class MQObjectName provides a static method, createServiceConfig, for constructing
object names of this form.
Table 3–7 Connection Service Names for Service
Configuration MBeans
|
Service Name
|
Service Type
|
Protocol Type
|
|
jms
|
Normal
|
TCP
|
|
ssljms
|
Normal
|
TLS (SSL-based security)
|
|
httpjms
|
Normal
|
HTTP
|
|
httpsjms
|
Normal
|
HTTPS (SSL-based security)
|
|
admin
|
Admin
|
TCP
|
|
ssladmin
|
Admin
|
TLS (SSL-based security)
|
Attributes
The service configuration MBean has the attributes shown in Table 3–8. The names of these attributes are
defined as static constants in the utility class ServiceAttributes.
Table 3–8 Service Configuration Attributes
|
Name
|
Type
|
Settable?
|
Description
|
|
Name
|
String
|
No
|
Service name
See Table 3–7 for possible values.
|
|
Port
|
Integer
|
Yes
|
Port number (jms, ssljms, admin, and ssladmin services only)
A value of 0 specifies that the port is to be dynamically
allocated by the Port Mapper; to learn the actual port currently used by the
service, use the Port attribute of the service monitor MBean.
|
|
MinThreads
|
Integer
|
Yes
|
Minimum number of threads assigned to service
Must be greater than 0.
|
|
MaxThreads
|
Integer
|
Yes
|
Maximum number of threads assigned to service
Must be greater than or equal to MinThreads.
|
|
ThreadPoolModel
|
String
|
No
|
Threading model for thread pool management:
dedicated: Two dedicated threads per connection,
one for incoming and one for outgoing messages
shared: Connections processed by shared
thread when sending or receiving messages (jms and admin services only)
|
Operations
The service configuration MBean supports the operations shown in Table 3–9. The names of these operations are
defined as static constants in the utility class ServiceOperations.
Table 3–9 Service Configuration Operations
|
Name
|
Parameters
|
Result Type
|
Description
|
|
pause
|
None
|
None
|
Pause service (jms, ssljms, httpjms, and httpsjms services only)
|
|
resume
|
None
|
None
|
Resume service (jms, ssljms, httpjms, and httpsjms services only)
|
Notification
The service configuration MBean supports the notification shown in Table 3–10.
Table 3–10 Service Configuration Notification
|
Name
|
Description
|
|
jmx.attribute.change
|
Attribute value changed
|
Service Monitor
The service monitor MBean is used for monitoring
a connection service. There is one such MBean for each service.
Object Name
The service monitor MBean has an object name of the following form:
com.sun.messaging.jms.server:type=Service,subtype=Monitor,name=serviceName
where serviceName is the name of the connection
service (see Table 3–11). The utility
class MQObjectName provides a static method, createServiceMonitor, for constructing
object names of this form.
Table 3–11 Connection Service Names for Service
Monitor MBeans
|
Service Name
|
Service Type
|
Protocol Type
|
|
jms
|
Normal
|
TCP
|
|
ssljms
|
Normal
|
TLS (SSL-based security)
|
|
httpjms
|
Normal
|
HTTP
|
|
httpsjms
|
Normal
|
HTTPS (SSL-based security)
|
|
admin
|
Admin
|
TCP
|
|
ssladmin
|
Admin
|
TLS (SSL-based security)
|
Attributes
The service monitor MBean has the attributes shown in Table 3–12. The names of these attributes
are defined as static constants in the utility class ServiceAttributes.
Table 3–12 Service Monitor Attributes
|
Name
|
Type
|
Settable?
|
Description
|
|
Name
|
String
|
No
|
Service name
See Table 3–11 for possible values.
|
|
Port
|
Integer
|
No
|
Port number currently used by service
|
|
State
|
Integer
|
No
|
Current state
See Table 3–13 for possible values.
|
|
StateLabel
|
String
|
No
|
String representation of current state:
Useful for displaying the state in human-readable form, such as in the Java Monitoring and Management Console (jconsole).
See Table 3–13 for possible values.
|
|
NumConnections
|
Integer
|
No
|
Current number of connections
|
|
NumConnectionsOpened
|
Long
|
No
|
Cumulative number of connections opened since broker started
|
|
NumConnectionsRejected
|
Long
|
No
|
Cumulative number of connections rejected since broker started
|
|
NumActiveThreads
|
Integer
|
No
|
Current number of threads actively handling connections
|
|
NumProducers
|
Integer
|
No
|
Current number of message producers
|
|
NumConsumers
|
Integer
|
No
|
Current number of message consumers
|
|
NumMsgsIn
|
Long
|
No
|
Cumulative number of messages received since broker started
|
|
NumMsgsOut
|
Long
|
No
|
Cumulative number of messages sent since broker started
|
|
MsgBytesIn
|
Long
|
No
|
Cumulative size in bytes of messages received since broker started
|
|
MsgBytesOut
|
Long
|
No
|
Cumulative size in bytes of messages sent since broker started
|
|
NumPktsIn
|
Long
|
No
|
Cumulative number of packets received since broker started
|
|
NumPktsOut
|
Long
|
No
|
Cumulative number of packets sent since broker started
|
|
PktBytesIn
|
Long
|
No
|
Cumulative size in bytes of packets received since broker started
|
|
PktBytesOut
|
Long
|
No
|
Cumulative size in bytes of packets sent since broker started
|
Table 3–13 shows the possible
values for the State and StateLabel attributes. These values are defined
as static constants in the utility class ServiceState.
Table 3–13 Connection Service State
Values
|
Value
|
Utility Constant
|
String Representation
|
Meaning
|
|
0
|
ServiceState.RUNNING
|
RUNNING
|
Service running
|
|
1
|
ServiceState.PAUSED
|
PAUSED
|
Service paused
|
|
2
|
ServiceState.QUIESCED
|
QUIESCED
|
Service quiesced
|
|
-1
|
ServiceState.UNKNOWN
|
UNKNOWN
|
Service state unknown
|
Operations
The service monitor MBean supports the operations shown in Table 3–14. The names of these operations
are defined as static constants in the utility class ServiceOperations.
Table 3–14 Service Monitor Operations
|
Name
|
Parameters
|
Result Type
|
Description
|
|
getConnections
|
None
|
ObjectName[]
|
Object names of connection monitor MBeans for all current connections
|
|
getProducerIDs
|
None
|
String[]
|
Producer identifiers of all current message producers
|
|
getConsumerIDs
|
None
|
String[]
|
Consumer identifiers of all current message consumers
|
Notifications
The service monitor MBean supports the notifications shown in Table 3–15. These notifications are instances
of the Message Queue JMX classes ServiceNotification and ConnectionNotification, and their names
are defined as static constants in those classes.
Table 3–15 Service Monitor Notifications
|
Name
|
Utility Constant
|
Description
|
|
mq.service.pause
|
ServiceNotification.SERVICE_PAUSE
|
Service paused
|
|
mq.service.resume
|
ServiceNotification.SERVICE_RESUME
|
Service resumed
|
|
mq.connection.open
|
ConnectionNotification.CONNECTION_OPEN
|
Connection opened
|
|
mq.connection.reject
|
ConnectionNotification.CONNECTION_REJECT
|
Connection rejected
|
|
mq.connection.close
|
ConnectionNotification.CONNECTION_CLOSE
|
Connection closed
|
Table 3–16 shows the method
defined in class ServiceNotification for obtaining details
about a service monitor notification. See Table 3–31 for the corresponding methods of class ConnectionNotification.
Table 3–16 Data Retrieval Method for
Service Monitor Notifications
|
Method
|
Result Type
|
Description
|
|
getServiceName
|
String
|
Service name
See Table 3–11 for possible values.
|
Service Manager Configuration
Each broker has a single service manager configuration MBean, used
for managing all of the broker's service configuration MBeans.
Object Name
The service manager configuration MBean has the following object name:
com.sun.messaging.jms.server:type=ServiceManager,subtype=Config
A string representing this object name is defined as a static constant SERVICE_MANAGER_CONFIG_MBEAN_NAME in the
utility class MQObjectName.
Attributes
The service manager configuration MBean has the attributes shown in Table 3–17. The names of these attributes
are defined as static constants in the utility class ServiceAttributes.
Table 3–17 Service Manager Configuration
Attributes
|
Name
|
Type
|
Settable?
|
Description
|
|
MinThreads
|
Integer
|
No
|
Total minimum number of threads for all active services
|
|
MaxThreads
|
Integer
|
No
|
Total maximum number of threads for all active services
|
Operations
The service manager configuration MBean supports the operations shown
in Table 3–18. The names of these operations
are defined as static constants in the utility class ServiceOperations.
Table 3–18 Service Manager Configuration
Operations
|
Name
|
Parameters
|
Result Type
|
Description
|
|
getServices
|
None
|
ObjectName[]
|
Object names of service configuration MBeans for all services
|
|
pause
|
None
|
None
|
Pause all services except admin and ssladmin
|
|
resume
|
None
|
None
|
Resume all services
|
Service Manager Monitor
Each broker has a single service manager monitor MBean, used
for managing all of the broker's service monitor MBeans.
Object Name
The service manager monitor MBean has the following object name:
com.sun.messaging.jms.server:type=ServiceManager,subtype=Monitor
A string representing this object name is defined as a static constant SERVICE_MANAGER_MONITOR_MBEAN_NAME in the
utility class MQObjectName.
Attributes
The service manager monitor MBean has the attributes shown in Table 3–19. The names of these attributes
are defined as static constants in the utility class ServiceAttributes.
Table 3–19 Service Manager Monitor
Attributes
|
Name
|
Type
|
Settable?
|
Description
|
|
NumServices
|
Integer
|
No
|
Number of connection services
|
|
NumActiveThreads
|
Integer
|
No
|
Total current number of threads actively handling connections for all
services
|
|
NumMsgsIn
|
Long
|
No
|
Total cumulative number of messages received by all services since broker
started
|
|
NumMsgsOut
|
Long
|
No
|
Total cumulative number of messages sent by all services since broker
started
|
|
MsgBytesIn
|
Long
|
No
|
Total cumulative size in bytes of messages received by all services
since broker started
|
|
MsgBytesOut
|
Long
|
No
|
Total cumulative size in bytes of messages sent by all services since
broker started
|
|
NumPktsIn
|
Long
|
No
|
Total cumulative number of packets received by all services since broker
started
|
|
NumPktsOut
|
Long
|
No
|
Total cumulative number of packets sent by all services since broker
started
|
|
PktBytesIn
|
Long
|
No
|
Total cumulative size in bytes of packets received by all services since
broker started
|
|
PktBytesOut
|
Long
|
No
|
Total cumulative size in bytes of packets sent by all services since
broker started
|
Operation
The service manager monitor MBean supports the operation shown in Table 3–20. The name of this operation is
defined as a static constant in the utility class ServiceOperations.
Table 3–20 Service Manager Monitor
Operation
|
Name
|
Parameters
|
Result Type
|
Description
|
|
getServices
|
None
|
ObjectName[]
|
Object names of all service monitor MBeans
|
Notifications
The service manager monitor MBean supports the notifications shown in Table 3–21. These notifications are instances
of the Message Queue JMX class ServiceNotification, and their names are
defined as static constants in that class.
Table 3–21 Service Manager Monitor
Notifications
|
Name
|
Utility Constant
|
Description
|
|
mq.service.pause
|
ServiceNotification.SERVICE_PAUSE
|
Service paused
|
|
mq.service.resume
|
ServiceNotification.SERVICE_RESUME
|
Service resumed
|
Table 3–22 shows the method
defined in class ServiceNotification for obtaining details
about a service manager monitor notification.
Table 3–22 Data Retrieval Method for
Service Manager Monitor Notifications
|
Method
|
Result Type
|
Description
|
|
getServiceName
|
String
|
Service name
See Table 3–11 for possible values.
|
Connections
This section describes the MBeans used for managing connections:
-
The connection configuration MBean configures a connection.
-
The connection monitor MBean monitors a connection.
-
The connection manager configuration MBean manages connection
configuration MBeans.
-
The connection manager monitor MBean manages connection monitor
MBeans.
The following subsections describe each of these MBeans in detail.
Connection Configuration
The connection configuration MBean is used for
configuring a connection. There is one such MBean for each connection.
Object Name
The connection configuration MBean has an object name of the following
form:
com.sun.messaging.jms.server:type=Connection,subtype=Config,id=connectionID
where connectionID is the connection identifier. For example:
com.sun.messaging.jms.server:type=Connection,subtype=Config,id=7853717387765338368
The utility class MQObjectName provides a static
method, createConnectionConfig, for constructing
object names of this form.
Attribute
The connection configuration MBean has the attribute shown in Table 3–23. The name of this attribute is
defined as a static constant in the utility class ConnectionAttributes.
Table 3–23 Connection Configuration
Attribute
|
Name
|
Type
|
Settable?
|
Description
|
|
ConnectionID
|
String
|
No
|
Connection identifier
|
Connection Monitor
The connection monitor MBean is used for monitoring
a connection. There is one such MBean for each connection.
Object Name
The connection monitor MBean has an object name of the following form:
com.sun.messaging.jms.server:type=Connection,subtype=Monitor,id=connectionID
where connectionID is the connection identifier. For example:
com.sun.messaging.jms.server:type=Connection,subtype=Monitor,id=7853717387765338368
The utility class MQObjectName provides a static
method, createConnectionMonitor, for constructing
object names of this form.
Attributes
The connection monitor MBean has the attributes shown in Table 3–24. The names of these attributes
are defined as static constants in the utility class ConnectionAttributes.
Table 3–24 Connection Monitor Attributes
|
Name
|
Type
|
Settable?
|
Description
|
|
ConnectionID
|
String
|
No
|
Connection identifier
|
|
Host
|
String
|
No
|
Host from which connection was made
|
|
Port
|
Integer
|
No
|
Port number
|
|
ServiceName
|
String
|
No
|
Connection service name
|
|
User
|
String
|
No
|
User name
|
|
ClientID
|
String
|
No
|
Client identifier
|
|
ClientPlatform
|
String
|
No
|
String describing client platform
|
|
NumProducers
|
Integer
|
No
|
Current number of associated message producers
|
|
NumConsumers
|
Integer
|
No
|
Current number of associated message consumers
|
Operations
The connection monitor MBean supports the operations shown in Table 3–25. The names of these operations
are defined as static constants in the utility class ConnectionOperations.
Table 3–25 Connection Monitor Operations
|
Name
|
Parameters
|
Result Type
|
Description
|
|
getService
|
None
|
ObjectName
|
Object name of service monitor MBean for associated connection service
|
|
getTemporaryDestinations
|
None
|
ObjectName[]
|
Object names of destination monitor MBeans for all associated temporary
destinations
|
|
getProducerIDs
|
None
|
String[]
|
Producer identifiers of all associated message producers
|
|
getConsumerIDs
|
None
|
String[]
|
Consumer identifiers of all associated message consumers
|
Connection Manager Configuration
Each broker has a single connection manager configuration
MBean, used for managing all of the broker's connection configuration
MBeans.
Object Name
The connection manager configuration MBean has the following object
name:
com.sun.messaging.jms.server:type=ConnectionManager,subtype=Config
A string representing this object name is defined as a static constant CONNECTION_MANAGER_CONFIG_MBEAN_NAME in the
utility class MQObjectName.
Attribute
The connection manager configuration MBean has the attribute shown in Table 3–26. The name of this attribute is
defined as a static constant in the utility class ConnectionAttributes.
Table 3–26 Connection Manager Configuration
Attribute
|
Name
|
Type
|
Settable?
|
Description
|
|
NumConnections
|
Integer
|
No
|
Number of current connections
|
Operations
The connection manager configuration MBean supports the operations shown
in Table 3–27. The names of these operations
are defined as static constants in the utility class ConnectionOperations.
Table 3–27 Connection Manager Configuration
Operations
|
Name
|
Parameters
|
Result Type
|
Description
|
|
getConnections
|
None
|
ObjectName[]
|
Object names of connection configuration MBeans for all current connections
|
|
destroy
|
connectionID (Long)
|
None
|
Destroy connection
The desired connection is designated by its connection identifier (connectionID).
|
Connection Manager Monitor
Each broker has a single connection manager monitor MBean, used
for managing all of the broker's connection monitor MBeans.
Object Name
The connection manager monitor MBean has the following object name:
com.sun.messaging.jms.server:type=ConnectionManager,subtype=Monitor
A string representing this object name is defined as a static constant CONNECTION_MANAGER_MONITOR_MBEAN_NAME in
the utility class MQObjectName.
Attributes
The connection manager monitor MBean has the attributes shown in Table 3–28. The names of these attributes
are defined as static constants in the utility class ConnectionAttributes.
Table 3–28 Connection Manager Monitor
Attributes
|
Name
|
Type
|
Settable?
|
Description
|
|
NumConnections
|
Integer
|
No
|
Current number of connections
|
|
NumConnectionsOpened
|
Long
|
No
|
Cumulative number of connections opened since broker started
|
|
NumConnectionsRejected
|
Long
|
No
|
Cumulative number of connections rejected since broker started
|
Operation
The connection manager monitor MBean supports the operation shown in Table 3–29. The name of this operation is
defined as a static constant in the utility class ConnectionOperations.
Table 3–29 Connection Manager Monitor
Operation
|
Name
|
Parameters
|
Result Type
|
Description
|
|
getConnections
|
None
|
ObjectName[]
|
Object names of connection monitor MBeans for all current connections
|
Notifications
The connection manager monitor MBean supports the notifications shown
in Table 3–30. These notifications
are instances of the Message Queue JMX class ConnectionNotification, and their names
are defined as static constants in that class.
Table 3–30 Connection Manager Monitor
Notifications
|
Name
|
Utility Constant
|
Description
|
|
mq.connection.open
|
ConnectionNotification.CONNECTION_OPEN
|
Connection opened
|
|
mq.connection.reject
|
ConnectionNotification.CONNECTION_REJECT
|
Connection rejected
|
|
mq.connection.close
|
ConnectionNotification.CONNECTION_CLOSE
|
Connection closed
|
Table 3–31 shows the methods
defined in class ConnectionNotification for obtaining details
about a connection manager monitor notification.
Table 3–31 Data Retrieval Methods
for Connection Manager Monitor Notifications
|
Method
|
Result Type
|
Description
|
|
getConnectionID
|
String
|
Connection identifier
|
|
getRemoteHost
|
String
|
Host from which connection was made
|
|
getServiceName
|
String
|
Connection service name
|
|
getUserName
|
String
|
User name
|
Destinations
This section describes the MBeans used for managing destinations:
-
The destination configuration MBean configures a destination.
-
The destination monitor MBean monitors a destination.
-
The destination manager configuration MBean manages destination
configuration MBeans.
-
The destination manager monitor MBean manages destination
monitor MBeans.
The following subsections describe each of these MBeans in detail.
Destination Configuration
The destination configuration MBean is used for
configuring a destination. There is one such MBean for each destination.
Object Name
The destination configuration MBean has an object name of the following
form:
com.sun.messaging.jms.server:type=Destination,subtype=Config,desttype=destinationType,name=destinationName
where destinationType is one of the destination
types shown in Table 3–33 and destinationName is the name of the destination. For example:
com.sun.messaging.jms.server:type=Destination,subtype=Config,desttype=t,name="Dest"
The utility class MQObjectName provides a static
method, createDestinationConfig, for constructing
object names of this form.
Attributes
The destination configuration MBean has the attributes shown in Table 3–32. The names of these attributes
are defined as static constants in the utility class DestinationAttributes.
Table 3–32 Destination Configuration
Attributes
|
Name
|
Type
|
Settable?
|
Description
|
|
Name
|
String
|
No
|
Destination name
|
|
Type
|
String
|
No
|
Destination type
See Table 3–33 for possible values.
|
|
MaxNumMsgs
|
Long
|
Yes
|
Maximum number of unconsumed messages
A value of -1 denotes an unlimited number
of messages.
|
|
MaxBytesPerMsg
|
Long
|
Yes
|
Maximum size, in bytes, of any single message
Rejection of a persistent message is reported to the producing client
with an exception; no notice is sent for nonpersistent messages.
A value of -1 denotes an unlimited message
size.
|
|
MaxTotalMsgBytes
|
Long
|
Yes
|
Maximum total memory, in bytes, for unconsumed messages
|
|
LimitBehavior
|
String
|
Yes
|
Broker behavior when memory-limit threshold reached
See Table 3–34 for possible values.
If the value is REMOVE_OLDEST or REMOVE_LOW_PRIORITY and the UseDMQ attribute is true,
excess messages are moved to the dead message queue.
|
|
MaxNumProducers
|
Integer
|
Yes
|
Maximum number of associated message producers
When this limit is reached, no new producers can be created. A value
of -1 denotes an unlimited number of producers.
|
|
MaxNumActiveConsumers [Queue destinations only]
|
Integer
|
Yes
|
Maximum number of associated
active message consumers in load-balanced delivery
A value of -1 denotes an unlimited number
of consumers.
|
|
MaxNumBackupConsumers
|
Integer
|
Yes
|
Maximum number of associated
backup message consumers in load-balanced delivery
A value of -1 denotes an unlimited number
of consumers.
|
|
ConsumerFlowLimit
|
Long
|
Yes
|
Maximum number of messages delivered to consumer in a single batch
In load-balanced queue delivery, this is the initial number of queued
messages routed to active consumers before load balancing begins. A destination
consumer can override this limit by specifying a lower value on a connection.
A value of -1 denotes an unlimited number
of consumers.
|
|
LocalOnly
|
Boolean
|
No
|
Local delivery only?
This property applies only to destinations in broker clusters, and cannot
be changed once the destination has been created. If true,
the destination is not replicated on other brokers and is limited to delivering
messages only to local consumers (those connected to the broker on which the
destination is created).
|
|
LocalDeliveryPreferred
|
Boolean
|
Yes
|
Local delivery preferred?
This property applies only to load-balanced delivery in broker clusters.
If true, messages will be delivered to remote consumers
only if there are no associated consumers on the local broker. The destination
must not be restricted to local-only delivery (LocalOnly must
be false).
|
|
UseDMQ
|
Boolean
|
Yes
|
Send dead messages to dead message queue?
If false, dead messages will simply be discarded.
|
Table 3–33 shows the possible
values for the Type attribute. These values are defined
as static constants in the utility class DestinationType.
Table 3–33 Destination Configuration
Type Values
|
Value
|
Utility Constant
|
Meaning
|
|
q
|
DestinationType.QUEUE
|
Queue (point-to-point) destination
|
|
t
|
DestinationType.TOPIC
|
Topic (publish/subscribe) destination
|
Table 3–34 shows the possible
values for the LimitBehavior attribute. These values are
defined as static constants in the utility class DestinationLimitBehavior.
Table 3–34 Destination Limit Behaviors
|
Value
|
Utility Constant
|
Meaning
|
|
FLOW_CONTROL
|
DestinationLimitBehavior.FLOW_CONTROL
|
Slow down producers
|
|
REMOVE_OLDEST
|
DestinationLimitBehavior.REMOVE_OLDEST
|
Throw out oldest messages
|
|
REMOVE_LOW_PRIORITY
|
DestinationLimitBehavior.REMOVE_LOW_PRIORITY
|
Throw out lowest-priority messages according to age; no notice to producing
client
|
|
REJECT_NEWEST
|
DestinationLimitBehavior.REJECT_NEWEST
|
Reject newest messages; notify producing client with an exception only
if message is persistent
|
Operations
The destination configuration MBean supports the operations shown in Table 3–35. The names of these operations
are defined as static constants in the utility class DestinationOperations.
Table 3–35 Destination Configuration
Operations
|
Name
|
Parameters
|
Result Type
|
Description
|
|
pause
|
pauseType (String)
|
None
|
Pause message delivery
See Table 3–36 for possible values
of pauseType.
|
|
pause
|
None
|
None
|
Pause all message delivery
Equivalent to pause(DestinationPauseType.ALL).
|
|
resume
|
None
|
None
|
Resume message delivery
|
|
purge
|
None
|
None
|
Purge all messages
|
|
compact [File-based persistence only]
|
None
|
None
|
Compact persistent data store
Note –
Only a paused destination can be compacted.
|
Table 3–36 shows the possible
values for the pause operation's pauseType parameter.
These values are defined as static constants in the utility class DestinationPauseType.
Table 3–36 Destination Pause Types
|
Value
|
Utility Constant
|
Meaning
|
|
PRODUCERS
|
DestinationPauseType.PRODUCERS
|
Pause delivery from associated message producers
|
|
CONSUMERS
|
DestinationPauseType.CONSUMERS
|
Pause delivery to associated message consumers
|
|
ALL
|
DestinationPauseType.ALL
|
Pause all message delivery
|
Notification
The destination configuration MBean supports the notification shown
in Table 3–37.
Table 3–37 Destination Configuration
Notification
|
Name
|
Description
|
|
jmx.attribute.change
|
Attribute value changed
|
Destination Monitor
The destination monitor MBean is used for monitoring
a destination. There is one such MBean for each destination.
Object Name
The destination monitor MBean has an object name of the following form:
com.sun.messaging.jms.server:type=Destination,subtype=Monitor,desttype=destinationType,name=destinationName
where destinationType is one of the destination
types shown in Table 3–39 and destinationName is the name of the destination. For example:
com.sun.messaging.jms.server:type=Destination,subtype=Monitor,desttype=t,name="Dest"
The utility class MQObjectName provides a static
method, createDestinationMonitor, for constructing
object names of this form.
Attributes
The destination monitor MBean has the attributes shown in Table 3–38. The names of these attributes
are defined as static constants in the utility class DestinationAttributes.
Table 3–38 Destination Monitor Attributes
|
Name
|
Type
|
Settable?
|
Description
|
|
Name
|
String
|
No
|
Destination name
|
|
Type
|
String
|
No
|
Destination type
See Table 3–39 for possible values.
|
|
CreatedByAdmin
|
Boolean
|
No
|
Administrator-created destination?
|
|
Temporary
|
Boolean
|
No
|
Temporary destination?
|
|
ConnectionID [Temporary destinations only]
|
String
|
No
|
Connection identifier
|
|
State
|
Integer
|
No
|
Current state
See Table 3–40 for possible values.
|
|
StateLabel
|
String
|
No
|
String representation of current state:
Useful for displaying the state in human-readable form, such as in the Java Monitoring and Management Console (jconsole).
See Table 3–40 for possible values.
|
|
NumProducers
|
Integer
|
No
|
Current number of associated message producers
|
|
NumConsumers
|
Integer
|
No
|
Current number of associated message consumers
For queue destinations, this attribute includes both active and backup
consumers. For topic destinations, it includes both nondurable and (active
and inactive) durable subscribers and is equivalent to NumActiveConsumers.
|
|
PeakNumConsumers
|
Integer
|
No
|
Peak number of associated message consumers since broker started
For queue destinations, this attribute includes both active and backup
consumers. For topic destinations, it includes both nondurable and (active
and inactive) durable subscribers and is equivalent to PeakNumActiveConsumers.
|
|
AvgNumConsumers
|
Integer
|
No
|
Average number of associated message consumers since broker started
For queue destinations, this attribute includes both active and backup
consumers. For topic destinations, it includes both nondurable and (active
and inactive) durable subscribers and is equivalent to AvgNumActiveConsumers.
|
|
NumActiveConsumers
|
Integer
|
No
|
Current number of associated active message consumers
For topic destinations, this attribute includes both nondurable and
(active and inactive) durable subscribers and is equivalent to NumConsumers.
|
|
PeakNumActiveConsumers
|
Integer
|
No
|
Peak number of associated active message consumers since broker started
For topic destinations, this attribute includes both nondurable and
(active and inactive) durable subscribers and is equivalent to PeakNumConsumers.
|
|
AvgNumActiveConsumers
|
Integer
|
No
|
Average number of associated active message consumers since broker started
For topic destinations, this attribute includes both nondurable and
(active and inactive) durable subscribers and is equivalent to AvgNumConsumers.
|
|
NumBackupConsumers [Queue destinations only]
|
Integer
|
No
|
Current number of associated
backup message consumers
|
|
PeakNumBackupConsumers
|
Integer
|
No
|
Peak number of associated backup
message consumers since broker started
|
|
AvgNumBackupConsumers
|
Integer
|
No
|
Average number of associated
backup message consumers since broker started
|
|
NumMsgs
|
Long
|
No
|
Current number of messages stored in memory and persistent store
Does not include messages held in transactions.
|
|
NumMsgsPendingAcks
|
Long
|
No
|
Current number of messages being held in memory and persistent store
pending acknowledgment
|
|
NumMsgsHeldInTransaction
|
Long
|
No
|
Current number of messages being held in memory and persistent store
in uncommitted transactions
|
|
PeakNumMsgs
|
Long
|
No
|
Peak number of messages stored in memory and persistent store since
broker started
|
|
AvgNumMsgs
|
Long
|
No
|
Average number of messages stored in memory and persistent store since
broker started
|
|
NumMsgsIn
|
Long
|
No
|
Cumulative number of messages received since broker started
|
|
NumMsgsOut
|
Long
|
No
|
Cumulative number of messages sent since broker started
|
|
MsgBytesIn
|
Long
|
No
|
Cumulative size in bytes of messages received since broker started
|
|
MsgBytesOut
|
Long
|
No
|
Cumulative size in bytes of messages sent since broker started
|
|
PeakMsgBytes
|
Long
|
No
|
Size in bytes of largest single message received since broker started
|
|
TotalMsgBytes
|
Long
|
No
|
Current total size in bytes of messages stored in memory and persistent
store
Does not include messages held in transactions.
|
|
TotalMsgBytesHeldInTransaction
|
Long
|
No
|
Current total size in bytes of messages being held in memory and persistent
store in uncommitted transactions
|
|
PeakTotalMsgBytes
|
Long
|
No
|
Peak total size in bytes of messages stored in memory and persistent
store since broker started
|
|
AvgTotalMsgBytes
|
Long
|
No
|
Average total size in bytes of messages stored in memory and persistent
store since broker started
|
|
DiskReserved [File-based persistence only]
|
Long
|
No
|
Amount of disk space, in bytes,
reserved for destination
|
|
DiskUsed
|
Long
|
No
|
Amount of disk space, in bytes,
currently in use by destination
|
|
DiskUtilizationRatio
|
Integer
|
No
|
Ratio of disk space currently
in use to disk space reserved for destination
|
Table 3–39 shows the possible
values for the Type attribute. These values are defined
as static constants in the utility class DestinationType.
Table 3–39 Destination Monitor Type
Values
|
Value
|
Utility Constant
|
Meaning
|
|
q
|
DestinationType.QUEUE
|
Queue (point-to-point) destination
|
|
t
|
DestinationType.TOPIC
|
Topic (publish/subscribe) destination
|
Table 3–40 shows the possible
values for the State and StateLabel attributes. These values are defined
as static constants in the utility class DestinationState.
Table 3–40 Destination State Values
|
Value
|
Utility Constant
|
String Representation
|
Meaning
|
|
0
|
DestinationState.RUNNING
|
RUNNING
|
Destination running
|
|
1
|
DestinationState.CONSUMERS_PAUSED
|
CONSUMERS_PAUSED
|
Message consumers paused
|
|
2
|
DestinationState.PRODUCERS_PAUSED
|
PRODUCERS_PAUSED
|
Message producers paused
|
|
3
|
DestinationState.PAUSED
|
PAUSED
|
Destination paused
|
|
-1
|
DestinationState.UNKNOWN
|
UNKNOWN
|
Destination state unknown
|
Operations
The destination monitor MBean supports the operations shown in Table 3–41. The names of these operations
are defined as static constants in the utility class DestinationOperations.
Table 3–41 Destination Monitor Operations
|
Name
|
Parameters
|
Result Type
|
Description
|
|
getConnection [Temporary destinations only]
|
None
|
ObjectName
|
Object name of connection monitor
MBean for connection
|
|
getProducerIDs
|
None
|
String[]
|
Producer identifiers of all current associated message producers
|
|
getConsumerIDs
|
None
|
String[]
|
Consumer identifiers of all current associated message consumers
For queue destinations, this operation returns both active and backup
consumers. For topic destinations, it returns both nondurable and (active
and inactive) durable subscribers.
|
|
getActiveConsumerIDs
|
None
|
String[]
|
Consumer identifiers of all current associated active message
consumers
For topic destinations, this operation returns both nondurable and (active
and inactive) durable subscribers.
|
|
getBackupConsumerIDs [Queue destinations only]
|
None
|
String[]
|
Consumer identifiers of all current associated backup message
consumers
|
Notifications
The destination monitor MBean supports the notifications shown in Table 3–42. These notifications are instances
of the Message Queue JMX class DestinationNotification, and their names
are defined as static constants in that class.
Table 3–42 Destination Monitor Notifications
|
Name
|
Utility Constant
|
Description
|
|
mq.destination.pause
|
DestinationNotification.DESTINATION_PAUSE
|
Destination paused
|
|
mq.destination.resume
|
DestinationNotification.DESTINATION_RESUME
|
Destination resumed
|
|
mq.destination.compact
|
DestinationNotification.DESTINATION_COMPACT
|
Destination compacted
|
|
mq.destination.purge
|
DestinationNotification.DESTINATION_PURGE
|
Destination purged
|
Table 3–43 shows the methods
defined in class DestinationNotification for obtaining details
about a destination monitor notification.
Table 3–43 Data Retrieval Methods
for Destination Monitor Notifications
|
Method
|
Result Type
|
Description
|
|
getDestinationName
|
String
|
Destination name
|
|
getDestinationType
|
String
|
Destination type
See Table 3–39 for possible values.
|
|
getCreatedByAdmin
|
Boolean
|
Administrator-created destination?
|
|
getPauseType
|
String
|
Pause type
See Table 3–36 for possible values.
|
Destination Manager Configuration
Each broker has a single destination manager configuration
MBean, used for managing all of the broker's destination configuration
MBeans.
Object Name
The destination manager configuration MBean has the following object
name:
com.sun.messaging.jms.server:type=DestinationManager,subtype=Config
A string representing this object name is defined as a static constant DESTINATION_MANAGER_CONFIG_MBEAN_NAME in
the utility class MQObjectName.
Attributes
The destination manager configuration MBean has the attributes shown
in Table 3–44. The names of these attributes
are defined as static constants in the utility class DestinationAttributes.
Table 3–44 Destination Manager Configuration
Attributes
|
Name
|
Type
|
Settable?
|
Description
|
|
AutoCreateQueues
|
Boolean
|
Yes
|
Allow auto-creation of queue destinations?
|
|
AutoCreateTopics
|
Boolean
|
Yes
|
Allow auto-creation of topic destinations?
|
|
NumDestinations
|
Integer
|
No
|
Current total number of destinations
|
|
MaxNumMsgs
|
Long
|
Yes
|
Maximum total number of unconsumed messages
A value of -1 denotes an unlimited
number of messages.
|
|
MaxBytesPerMsg
|
Long
|
Yes
|
Maximum size, in bytes, of any single message
A value of -1 denotes an unlimited
message size.
|
|
MaxTotalMsgBytes
|
Long
|
Yes
|
Maximum total memory, in bytes, for unconsumed messages
A value of -1 denotes an unlimited
number of bytes.
|
|
AutoCreateQueueMaxNumActiveConsumers [Auto-created queue destinations only]
|
Integer
|
Yes
|
Maximum total number
of active message consumers in load-balanced delivery
A value of -1 denotes an unlimited
number of consumers.
|
|
AutoCreateQueueMaxNumBackupConsumers
|
Integer
|
Yes
|
Maximum total number
of backup message consumers in load-balanced delivery
A value of -1 denotes an unlimited
number of consumers.
|
|
DMQTruncateBody
|
Boolean
|
Yes
|
Remove message body before storing in dead message queue?
If true, only the message header and property
data will be saved.
|
|
LogDeadMsgs
|
Boolean
|
Yes
|
Log information about dead messages?
If true, the following events will be logged:
-
A destination is full, having reached its maximum size or
message count.
-
The broker discards a message for a reason other than an administrative
command or delivery acknowledgment.
-
The broker moves a message to the dead message queue.
|
Operations
The destination manager configuration MBean supports the operations
shown in Table 3–45. The names of these
operations are defined as static constants in the utility class DestinationOperations.
Table 3–45 Destination Manager Configuration
Operations
|
Name
|
Parameters
|
Result Type
|
Description
|
|
getDestinations
|
None
|
ObjectName[]
|
Object names of destination configuration MBeans for all current destinations
|
|
create
|
destinationType (String)
destinationName (String)
destinationAttributes (AttributeList)
|
None
|
Create destination with specified type, name, and attributes
The destinationType and destinationName parameters
are required, but destinationAttributes may be null.
See Table 3–46 for possible values
of destinationType.
The destinationAttributes list may include any
of the attributes listed in Table 3–32 except Name and Type. The names of these attributes are defined
as static constants in the utility class DestinationAttributes.
|
|
create
|
destinationType (String)
destinationName (String)
|
None
|
Create destination with specified type and name
Equivalent to create(destinationType, destinationName, null).
See Table 3–46 for possible values
of destinationType.
|
|
destroy
|
destinationType (String)
destinationName (String)
|
None
|
Destroy destination
See Table 3–46 for possible values
of destinationType.
|
|
pause
|
pauseType (String)
|
None
|
Pause message delivery for all destinations
See Table 3–47 for possible values
of pauseType.
|
|
pause
|
None
|
None
|
Pause all message delivery for all destinations
Equivalent to pause(DestinationPauseType.ALL).
|
|
resume
|
None
|
None
|
Resume message delivery for all destinations
|
|
compact [File-based persistence only]
|
None
|
None
|
Compact all destinations
Note –
Only paused destinations can be compacted.
|
Table 3–46 shows the possible
values for the create and destroy operations' destinationType parameters. These values are defined as static constants in the
utility class DestinationType.
Table 3–46 Destination Manager Configuration
Type Values
|
Value
|
Utility Constant
|
Meaning
|
|
q
|
DestinationType.QUEUE
|
Queue (point-to-point) destination
|
|
t
|
DestinationType.TOPIC
|
Topic (publish/subscribe) destination
|
Table 3–47 shows the possible
values for the pause operation's pauseType parameter.
These values are defined as static constants in the utility class DestinationPauseType.
Table 3–47 Destination Manager Pause
Types
|
Value
|
Utility Constant
|
Meaning
|
|
PRODUCERS
|
DestinationPauseType.PRODUCERS
|
Pause delivery from associated message producers
|
|
CONSUMERS
|
DestinationPauseType.CONSUMERS
|
Pause delivery to associated message consumers
|
|
ALL
|
DestinationPauseType.ALL
|
Pause all delivery
|
Notification
The destination manager configuration MBean supports the notification
shown in Table 3–48.
Table 3–48 Destination Manager Configuration
Notification
|
Name
|
Description
|
|
jmx.attribute.change
|
Attribute value changed
|
Destination Manager Monitor
Each broker has a single destination manager monitor MBean, used
for managing all of the broker's destination monitor MBeans.
Object Name
The destination manager monitor MBean has the following object name:
com.sun.messaging.jms.server:type=DestinationManager,subtype=Monitor
A string representing this object name is defined as a static constant DESTINATION_MANAGER_MONITOR_MBEAN_NAME in
the utility class MQObjectName.
Attributes
The destination manager monitor MBean has the attributes shown in Table 3–49. The names of these attributes
are defined as static constants in the utility class DestinationAttributes.
Table 3–49 Destination Manager Monitor
Attributes
|
Name
|
Type
|
Settable?
|
Description
|
|
NumDestinations
|
Integer
|
No
|
Current total number of destinations
|
|
NumMsgs
|
Long
|
No
|
Current total number of messages stored in memory and persistent store
for all destinations
Does not include messages held in transactions.
|
|
TotalMsgBytes
|
Long
|
No
|
Current total size in bytes of messages stored in memory and persistent
store for all destinations
Does not include messages held in transactions.
|
|
NumMsgsInDMQ
|
Long
|
No
|
Current number of messages stored in memory and persistent store for dead message queue
|
|
TotalMsgBytesInDMQ
|
Long
|
No
|
Current total size in bytes of messages stored in memory and persistent
store for dead message queue
|
Operation
The destination manager monitor MBean supports the operation shown in Table 3–50. The name of this operation is
defined as a static constant in the utility class DestinationOperations.
Table 3–50 Destination Manager Monitor
Operation
|
Name
|
Parameters
|
Result Type
|
Description
|
|
getDestinations
|
None
|
ObjectName[]
|
Object names of destination monitor MBeans for all current destinations
|
Notifications
The destination manager monitor MBean supports the notifications shown
in Table 3–51. These notifications
are instances of the Message Queue JMX class DestinationNotification, and their names
are defined as static constants in that class.
Table 3–51 Destination Manager Monitor
Notifications
|
Name
|
Utility Constant
|
Description
|
|
mq.destination.create
|
DestinationNotification.DESTINATION_CREATE
|
Destination created
|
|
mq.destination.destroy
|
DestinationNotification.DESTINATION_DESTROY
|
Destination destroyed
|
|
mq.destination.pause
|
DestinationNotification.DESTINATION_PAUSE
|
Destination paused
|
|
mq.destination.resume
|
DestinationNotification.DESTINATION_RESUME
|
Destination resumed
|
|
mq.destination.compact
|
DestinationNotification.DESTINATION_COMPACT
|
Destination compacted
|
|
mq.destination.purge
|
DestinationNotification.DESTINATION_PURGE
|
Destination purged
|
Table 3–52 shows the methods
defined in class DestinationNotification for obtaining details
about a destination manager monitor notification.
Table 3–52 Data Retrieval Methods
for Destination Manager Monitor Notifications
|
Method
|
Result Type
|
Description
|
|
getDestinationName
|
String
|
Destination name
|
|
getDestinationType
|
String
|
Destination type
See Table 3–46 for possible values.
|
|
getCreatedByAdmin
|
Boolean
|
Administrator-created destination?
|
|
getPauseType
|
String
|
Pause type
See Table 3–47 for possible values.
|
Message Producers
This section describes the MBeans used for managing message producers:
The following subsections describe each of these MBeans in detail.
Note –
Notice that there are no resource MBeans associated with individual
message producers; rather, all producers are managed through the broker's
global producer manager configuration and producer manager monitor MBeans.
Producer Manager Configuration
Each broker has a single producer manager configuration MBean, used
for configuring all of the broker's message producers.
Object Name
The producer manager configuration MBean has the following object name:
com.sun.messaging.jms.server:type=ProducerManager,subtype=Config
A string representing this object name is defined as a static constant PRODUCER_MANAGER_CONFIG_MBEAN_NAME in the
utility class MQObjectName.
Attribute
The producer manager configuration MBean has the attribute shown in Table 3–53. The name of this attribute is
defined as a static constant in the utility class ProducerAttributes.
Table 3–53 Producer Manager Configuration
Attribute
|
Name
|
Type
|
Settable?
|
Description
|
|
NumProducers
|
Integer
|
No
|
Current total number of message producers
|
Operation
The producer manager configuration MBean supports the operation shown
in Table 3–54. The name of this operation
is defined as a static constant in the utility class ProducerOperations.
Table 3–54 Producer Manager Configuration
Operation
|
Name
|
Parameters
|
Result Type
|
Description
|
|
getProducerIDs
|
None
|
String[]
|
Producer identifiers of all current message producers
|
Producer Manager Monitor
Each broker has a single producer manager monitor MBean, used
for monitoring all of the broker's message producers.
Object Name
The producer manager monitor MBean has the following object name:
com.sun.messaging.jms.server:type=ProducerManager,subtype=Monitor
A string representing this object name is defined as a static constant PRODUCER_MANAGER_MONITOR_MBEAN_NAME in the
utility class MQObjectName.
Attribute
The producer manager monitor MBean has the attribute shown in Table 3–55. The name of this attribute is
defined as a static constant in the utility class ProducerAttributes.
Table 3–55 Producer Manager Monitor
Attribute
|
Name
|
Type
|
Settable?
|
Description
|
|
NumProducers
|
Integer
|
No
|
Current total number of message producers
|
Operations
The producer manager monitor MBean supports the operations shown in Table 3–56. The names of these operations
are defined as static constants in the utility class ProducerOperations.
Table 3–56 Producer Manager Monitor
Operations
|
Name
|
Parameters
|
Result Type
|
Description
|
|
getProducerIDs
|
None
|
String[]
|
Producer identifiers of all current message producers
|
|
getProducerInfoByID
|
producerID (String)
|
CompositeData
|
Descriptive information about message producer
The desired producer is designated by its producer identifier (producerID). The value
returned is a JMX CompositeData object describing the producer;
see Table 3–57 for lookup keys used
with this object.
|
|
getProducerInfo
|
None
|
CompositeData[]
|
Descriptive information about all current message producers
The value returned is an array of JMX CompositeData objects describing the producers;
see Table 3–57 for lookup keys used
with these objects.
|
The getProducerInfoByID and getProducerInfo operations return objects
implementing the JMX interface CompositeData, which maps lookup keys to
associated data values. The keys shown in Table 3–57 are defined as static constants in the utility class ProducerInfo for use with these objects.
Table 3–57 Lookup Keys for Message
Producer Information
|
Name
|
Value Type
|
Description
|
|
ProducerID
|
String
|
Producer identifier
|
|
ServiceName
|
String
|
Name of associated connection service
|
|
ConnectionID
|
String
|
Connection identifier of associated connection
|
|
Host
|
String
|
Connection's host name
|
|
User
|
String
|
Connection's user name
|
|
DestinationName
|
String
|
Name of associated destination
|
|
DestinationType
|
String
|
Type of associated destination
See Table 3–58 for possible values.
|
|
FlowPaused
|
Boolean
|
Message delivery paused?
|
|
NumMsgs
|
Long
|
Number of messages sent
|
Table 3–58 shows the possible
values returned for the lookup key DestinationType. These values are defined as
static constants in the utility class DestinationType.
Table 3–58 Message Producer Destination
Types
|
Value
|
Utility Constant
|
Meaning
|
|
q
|
DestinationType.QUEUE
|
Queue (point-to-point) destination
|
|
t
|
DestinationType.TOPIC
|
Topic (publish/subscribe) destination
|
Message Consumers
This section describes the MBeans used for managing message consumers:
The following subsections describe each of these MBeans in detail.
Note –
Notice that there are no resource MBeans associated with individual
message consumers; rather, all consumers are managed through the broker's
global consumer manager configuration and consumer manager monitor MBeans.
Consumer Manager Configuration
Each broker has a single consumer manager configuration MBean, used
for configuring all of the broker's message consumers.
Object Name
The consumer manager configuration MBean has the following object name:
com.sun.messaging.jms.server:type=ConsumerManager,subtype=Config
A string representing this object name is defined as a static constant CONSUMER_MANAGER_CONFIG_MBEAN_NAME in the
utility class MQObjectName.
Attribute
The consumer manager configuration MBean has the attribute shown in Table 3–59. The name of this attribute is
defined as a static constant in the utility class ConsumerAttributes.
Table 3–59 Consumer Manager Configuration
Attribute
|
Name
|
Type
|
Settable?
|
Description
|
|
NumConsumers
|
Integer
|
No
|
Current total number of message consumers
|
Operations
The consumer manager configuration MBean supports the operations shown
in Table 3–60. The names of these operations
are defined as static constants in the utility class ConsumerOperations.
Table 3–60 Consumer Manager Configuration
Operations
|
Name
|
Parameters
|
Result Type
|
Description
|
|
getConsumerIDs
|
None
|
String[]
|
Consumer identifiers of all current message consumers
|
|
purge [Durable topic subscribers only]
|
consumerID (String)
|
None
|
Purge all messages
The desired subscriber is designated by its consumer identifier (consumerID).
The subscriber itself is not destroyed.
|
Consumer Manager Monitor
Each broker has a single consumer manager monitor MBean, used
for monitoring all of the broker's message consumers.
Object Name
The consumer manager monitor MBean has the following object name:
com.sun.messaging.jms.server:type=ConsumerManager,subtype=Monitor
A string representing this object name is defined as a static constant CONSUMER_MANAGER_MONITOR_MBEAN_NAME in the
utility class MQObjectName.
Attribute
The consumer manager monitor MBean has the attribute shown in Table 3–61. The name of this attribute is
defined as a static constant in the utility class ConsumerAttributes.
Table 3–61 Consumer Manager Monitor
Attribute
|
Name
|
Type
|
Settable?
|
Description
|
|
NumConsumers
|
Integer
|
No
|
Current total number of message consumers
|
Operations
The consumer manager monitor MBean supports the operations shown in Table 3–62. The names of these operations
are defined as static constants in the utility class ConsumerOperations.
Table 3–62 Consumer Manager Monitor
Operations
|
Name
|
Parameters
|
Result Type
|
Description
|
|
getConsumerIDs
|
None
|
String[]
|
Consumer identifiers of all current message consumers
|
|
getConsumerInfoByID
|
consumerID (String)
|
CompositeData
|
Descriptive information about message consumer
The desired consumer is designated by its consumer identifier (consumerID). The value
returned is a JMX CompositeData object describing the consumer;
see Table 3–63 for lookup keys used
with this object.
|
|
getConsumerInfo
|
None
|
CompositeData[]
|
Descriptive information about all current message consumers
The value returned is an array of JMX CompositeData objects describing the consumers;
see Table 3–63 for lookup keys used
with these objects.
|
The getConsumerInfoByID and getConsumerInfo operations return objects
implementing the JMX interface CompositeData, which maps lookup keys to
associated data values. The keys shown in Table 3–63 are defined as static constants in the utility class ConsumerInfo for use with these objects.
Table 3–63 Lookup Keys for Message
Consumer Information
|
Name
|
Value Type
|
Description
|
|
ConsumerID
|
String
|
Consumer identifier
|
|
Selector
|
String
|
Message selector
|
|
ServiceName
|
String
|
Name of associated connection service
|
|
ConnectionID
|
String
|
Connection identifier of associated connection
|
|
Host
|
String
|
Connection's host name
|
|
User
|
String
|
Connection's user name
|
|
DestinationName
|
String
|
Name of associated destination
|
|
DestinationType
|
String
|
Type of associated destination
See Table 3–64 for possible values.
|
|
AcknowledgeMode
|
Integer
|
Acknowledgment mode of associated session
See Table 3–65 for possible values.
|
|
AcknowledgeModeLabel
|
String
|
String representation of acknowledgment mode
Useful for displaying the acknowledgment mode in human-readable form,
such as in the Java Monitoring and Management Console (jconsole).
See Table 3–65 for possible values.
|
|
Durable
|
Boolean
|
Durable topic subscriber?
|
|
DurableName [Durable topic subscribers only]
|
String
|
Subscription name
|
|
ClientID
|
String
|
Client identifier
|
|
DurableActive
|
Boolean
|
Subscriber active?
|
|
FlowPaused
|
Boolean
|
Message delivery paused?
|
|
NumMsgs
|
Long
|
Cumulative number of messages received
|
|
NumMsgsPendingAcks
|
Long
|
Current number of messages being held in memory and persistent store
pending acknowledgment
|
|
LastAckTime
|
Long
|
Time of last acknowledgment, in standard Java format (milliseconds since
January 1, 1970, 00:00:00 UTC)
|
Table 3–64 shows the possible
values returned for the lookup key DestinationType. These values are defined as
static constants in the utility class DestinationType.
Table 3–64 Message Consumer Destination
Types
|
Value
|
Utility Constant
|
Meaning
|
|
q
|
DestinationType.QUEUE
|
Queue (point-to-point) destination
|
|
t
|
DestinationType.TOPIC
|
Topic (publish/subscribe) destination
|
Table 3–65 shows the possible
values returned for the lookup keys AcknowledgeMode and AcknowledgeModeLabel. Four of these values
are defined as static constants in the standard JMS interface javax.jms.Session; the fifth (NO_ACKNOWLEDGE) is defined in the extended Message Queue version of the interface, com.sun.messaging.jms.Session.
Table 3–65 Acknowledgment Modes
|
Value
|
Utility Constant
|
String Representation
|
Meaning
|
|
1
|
javax.jms.Session.AUTO_ACKNOWLEDGE
|
AUTO_ACKNOWLEDGE
|
Auto-acknowledge mode
|
|
2
|
javax.jms.Session.CLIENT_ACKNOWLEDGE
|
CLIENT_ACKNOWLEDGE
|
Client-acknowledge mode
|
|
3
|
javax.jms.Session.DUPS_OK_ACKNOWLEDGE
|
DUPS_OK_ACKNOWLEDGE
|
Dups-OK-acknowledge mode
|
|
32768
|
com.sun.messaging.jms.Session.NO_ACKNOWLEDGE
|
NO_ACKNOWLEDGE
|
No-acknowledge mode
|
|
0
|
javax.jms.Session.SESSION_TRANSACTED
|
SESSION_TRANSACTED
|
Session is transacted (acknowledgment mode ignored)
|
Transactions
This section describes the MBeans used for managing transactions:
The following subsections describe each of these MBeans in detail.
Note –
Notice that there are no resource MBeans associated with individual
transactions; rather, all transactions are managed through the broker's global
transaction manager configuration and transaction manager monitor MBeans.
Transaction Manager Configuration
Each broker has a single transaction manager configuration
MBean, used for configuring all of the broker's transactions.
Object Name
The transaction manager configuration MBean has the following object
name:
com.sun.messaging.jms.server:type=TransactionManager,subtype=Config
A string representing this object name is defined as a static constant TRANSACTION_MANAGER_CONFIG_MBEAN_NAME in
the utility class MQObjectName.
Attribute
The transaction manager configuration MBean has the attribute shown
in Table 3–66. The name of this attribute
is defined as a static constant in the utility class TransactionAttributes.
Table 3–66 Transaction Manager Configuration
Attribute
|
Name
|
Type
|
Settable?
|
Description
|
|
NumTransactions
|
Integer
|
No
|
Current number of open transactions
|
Operations
The transaction manager configuration MBean supports the operations
shown in Table 3–67. The names of these
operations are defined as static constants in the utility class TransactionOperations.
Table 3–67 Transaction Manager Configuration
Operations
|
Name
|
Parameters
|
Result Type
|
Description
|
|
getTransactionIDs
|
None
|
String[]
|
Transaction identifiers of all current open transactions
|
|
commit
|
transactionID (String)
|
None
|
Commit transaction
The desired transaction is designated by its transaction identifier (transactionID).
|
|
rollback
|
transactionID (String)
|
None
|
Roll back transaction
The desired transaction is designated by its transaction identifier (transactionID).
|
Transaction Manager Monitor
Each broker has a single transaction manager monitor MBean, used
for monitoring all of the broker's transactions.
Object Name
The transaction manager monitor MBean has the following object name:
com.sun.messaging.jms.server:type=TransactionManager,subtype=Monitor
A string representing this object name is defined as a static constant TRANSACTION_MANAGER_MONITOR_MBEAN_NAME in
the utility class MQObjectName.
Attributes
The transaction manager monitor MBean has the attributes shown in Table 3–68. The names of these attributes
are defined as static constants in the utility class TransactionAttributes.
Table 3–68 Transaction Manager Monitor
Attributes
|
Name
|
Type
|
Settable?
|
Description
|
|
NumTransactions
|
Integer
|
No
|
Current number of open transactions
|
|
NumTransactionsCommitted
|
Long
|
No
|
Cumulative number of transactions committed since broker started
|
|
NumTransactionsRollback
|
Long
|
No
|
Cumulative number of transactions rolled back since broker started
|
Operations
The transaction manager monitor MBean supports the operations shown
in Table 3–69. The names of these operations
are defined as static constants in the utility class TransactionOperations.
Table 3–69 Transaction Manager Monitor
Operations
|
Name
|
Parameters
|
Result Type
|
Description
|
|
getTransactionIDs
|
None
|
String[]
|
Transaction identifiers of all current open transactions
|
|
getTransactionInfoByID
|
transactionID (String)
|
CompositeData
|
Descriptive information about transaction
The desired transaction is designated by its transaction identifier (transactionID).
The value returned is a JMX CompositeData object describing the transaction;
see Table 3–70 for lookup keys used
with this object.
|
|
getTransactionInfo
|
None
|
CompositeData[]
|
Descriptive information about all current open transactions
The value returned is an array of JMX CompositeData objects describing the transactions;
see Table 3–70 for lookup keys used
with these objects.
|
The getTransactionInfoByID and getTransactionInfo operations return
objects implementing the JMX interface CompositeData, which maps lookup keys to
associated data values. The keys shown in Table 3–70 are defined as static constants in the utility class TransactionInfo for use with these objects.
Table 3–70 Lookup Keys for Transaction
Information
|
Name
|
Value Type
|
Description
|
|
TransactionID
|
String
|
Transaction identifier
|
|
XID [Distributed transactions only]
|
String
|
Distributed transaction identifier (XID)
|
|
User
|
String
|
User name
|
|
ClientID
|
String
|
Client identifier
|
|
ConnectionString
|
String
|
Connection string
|
|
CreationTime
|
Long
|
Time created, in standard Java format (milliseconds since January 1,
1970, 00:00:00 UTC)
|
|
State
|
Integer
|
Current state
See Table 3–71 for possible values.
|
|
StateLabel
|
String
|
String representation of current state
Useful for displaying the state in human-readable form, such as in the Java Monitoring and Management Console (jconsole).
See Table 3–71 for possible values.
|
|
NumMsgs
|
Long
|
Number of messages
|
|
NumAcks
|
Long
|
Number of acknowledgments
|
Table 3–71 shows the possible
values returned for the lookup keys State and StateLabel. These values are defined as static
constants in the utility class TransactionState.
Table 3–71 Transaction State Values
|
Value
|
Utility Constant
|
String Representation
|
Meaning
|
|
0
|
TransactionState.CREATED
|
CREATED
|
Transaction created
|
|
1
|
TransactionState.STARTED
|
STARTED
|
Transaction started
|
|
2
|
TransactionState.FAILED
|
FAILED
|
Transaction has failed
|
|
3
|
TransactionState.INCOMPLETE
|
INCOMPLETE
|
Transaction incomplete
|
|
4
|
TransactionState.COMPLETE
|
COMPLETE
|
Transaction complete
|
|
5
|
TransactionState.PREPARED
|
PREPARED
|
Transaction in prepared state [Distributed transactions only]
|
|
6
|
TransactionState.COMMITTED
|
COMMITTED
|
Transaction committed
|
|
7
|
TransactionState.ROLLEDBACK
|
ROLLEDBACK
|
Transaction rolled back
|
|
8
|
TransactionState.TIMED_OUT
|
TIMED_OUT
|
Transaction has timed out
|
|
-1
|
TransactionState.UNKNOWN
|
UNKNOWN
|
Transaction state unknown
|
Notifications
The transaction manager monitor MBean supports the notifications shown
in Table 3–72. These notifications
are instances of the Message Queue JMX class TransactionNotification, and their names
are defined as static constants in that class.
Table 3–72 Transaction Manager Monitor
Notifications
|
Name
|
Utility Constant
|
Description
|
|
mq.transaction.prepare [Distributed transactions only]
|
TransactionNotification.TRANSACTION_PREPARE
|
Transaction has entered prepared
state
|
|
mq.transaction.commit
|
TransactionNotification.TRANSACTION_COMMIT
|
Transaction committed
|
|
mq.transaction.rollback
|
TransactionNotification.TRANSACTION_ROLLBACK
|
Transaction rolled back
|
Table 3–73 shows the method
defined in class TransactionNotification for obtaining details
about a transaction manager monitor notification.
Table 3–73 Data Retrieval Method for
Transaction Manager Monitor Notifications
|
Method
|
Result Type
|
Description
|
|
getTransactionID
|
String
|
Transaction identifier
|
Broker Clusters
This section describes the MBeans used for managing broker clusters:
The following subsections describe each of these MBeans in detail.
Cluster Configuration
The cluster configuration MBean is used for configuring
a broker's cluster-related properties. There is one such MBean for each broker.
Object Name
The cluster configuration MBean has the following object name:
com.sun.messaging.jms.server:type=Cluster,subtype=Config
A string representing this object name is defined as a static constant CLUSTER_CONFIG_MBEAN_NAME in the utility
class MQObjectName.
Attributes
The cluster configuration MBean has the attributes shown in Table 3–74. The names of these attributes
are defined as static constants in the utility class ClusterAttributes.
Table 3–74 Cluster Configuration Attributes
|
Name
|
Type
|
Settable?
|
Description
|
|
HighlyAvailable
|
Boolean
|
No
|
High-availability (HA) cluster?
|
|
ClusterID [HA clusters only]
|
String
|
No
|
Cluster identifier
Must be unique; no two running clusters may have the same cluster identifier.
This identifier is appended to the names of all database tables in the
cluster’s shared persistent store. Must be an alphanumeric string of
no more than n - 13 characters, where n is the maximum table name length allowed by the database.
Note –
For brokers belonging to an HA cluster, this
attribute is used in database table names in place of the BrokerID (see Table 3–1).
|
|
ConfigFileURL [Conventional clusters only]
|
String
|
Yes
|
URL of cluster configuration file
|
|
LocalBrokerInfo
|
CompositeData
|
No
|
Descriptive information about local broker
The value returned is a JMX CompositeData object describing the broker;
see Table 3–76 for lookup keys used with this object.
|
|
MasterBrokerInfo
|
CompositeData
|
No
|
Descriptive information about master broker
The value returned is a JMX CompositeData object describing the master
broker; see Table 3–76 for lookup keys used with this
object.
|
Operations
The cluster configuration MBean supports the operations shown in Table 3–75. The names of these operations
are defined as static constants in the utility class ClusterOperations.
Table 3–75 Cluster Configuration Operations
|
Name
|
Parameters
|
Result Type
|
Description
|
|
getBrokerAddresses
|
None
|
String[]
|
Addresses of brokers in cluster
Each address specifies the host name and Port Mapper port number of
a broker in the cluster, in the form hostName:portNumber.
Example:
For conventional
clusters, the list includes all brokers specified by the broker property imq.cluster.brokerlist. For HA clusters, it includes all active and
inactive brokers in the cluster table stored in the HA database.
|
|
getBrokerIDs [HA clusters only]
|
None
|
String[]
|
Broker identifiers of brokers in cluster
The list includes all active and inactive brokers in the cluster table
stored in the HA database.
|
|
getBrokerInfoByAddress
|
brokerAddress (String)
|
CompositeData
|
Descriptive information about broker
The desired broker is designated by its host name and Port Mapper port
number (brokerAddress), in the form hostName:portNumber.
The value returned is a JMX CompositeData object describing the broker;
see Table 3–76 for lookup keys used
with this object.
|
|
getBrokerInfoByID
|
brokerID (String)
|
CompositeData
|
Descriptive information about broker
The desired broker is designated by its broker identifier (brokerID). The value
returned is a JMX CompositeData object describing the broker;
see Table 3–76 for lookup keys used
with this object. For conventional clusters, the operation returns null.
|
|
getBrokerInfo
|
None
|
CompositeData[]
|
Descriptive information about all brokers in cluster
The value returned is an array of JMX CompositeData objects describing the brokers;
see Table 3–76 for lookup keys used
with these objects.
For conventional
clusters, the array includes all brokers specified by the broker property imq.cluster.brokerlist. For HA clusters, it includes all active and
inactive brokers in the cluster table stored in the HA database.
|
|
reload [Conventional clusters only]
|
None
|
None
|
Reload cluster configuration file
|
The LocalBrokerInfo and MasterBrokerInfo attributes and the getBrokerInfoByAddress, getBrokerInfoByID, and getBrokerInfo operations return objects
implementing the JMX interface CompositeData, which maps lookup keys to
associated data values. The keys shown in Table 3–76 are defined
as static
constants
in the utility class BrokerClusterInfo for use with these objects.
Table 3–76 Lookup Keys for Cluster Configuration
Information
|
Key
|
Value Type
|
Description
|
|
Address
|
String
|
Broker address, in the form hostName:portNumber
Example:
|
|
ID [HA clusters only]
|
String
|
Broker identifier
|
Notification
The cluster configuration MBean supports the notification shown in Table 3–77.
Table 3–77 Cluster Configuration Notification
|
Name
|
Description
|
|
jmx.attribute.change
|
Attribute value changed
|
Cluster Monitor
The cluster monitor MBean is used for monitoring
the brokers in a cluster. There is one such MBean for each broker.
Object Name
The cluster monitor MBean has the following object name:
com.sun.messaging.jms.server:type=Cluster,subtype=Monitor
A string representing this object name is defined as a static constant CLUSTER_MONITOR_MBEAN_NAME in the utility
class MQObjectName.
Attributes
The cluster monitor MBean has the attributes shown in Table 3–78. The names of these attributes
are defined as static constants in the utility class ClusterAttributes.
Table 3–78 Cluster Monitor Attributes
|
Name
|
Type
|
Settable?
|
Description
|
|
HighlyAvailable
|
Boolean
|
No
|
High-availability (HA) cluster?
|
|
ClusterID [HA clusters only]
|
String
|
No
|
Cluster identifier
Must be unique; no two running clusters may have the same cluster identifier.
This identifier is appended to the names of all database tables in the
cluster’s shared persistent store. Must be an alphanumeric string of
no more than n - 13 characters, where n is the maximum table name length allowed by the database.
Note –
For brokers belonging to an HA cluster, this
attribute is used in database table names in place of the BrokerID (see Table 3–4).
|
|
ConfigFileURL [Conventional clusters only]
|
String
|
Yes
|
URL of cluster configuration file
|
|
LocalBrokerInfo
|
CompositeData
|
No
|
Descriptive information about local broker
The value returned is a JMX CompositeData object describing the broker;
see Table 3–80 for lookup keys used
with this object.
|
|
MasterBrokerInfo
|
CompositeData
|
No
|
Descriptive information about master broker
The value returned is a JMX CompositeData object describing the master
broker; see Table 3–80 for lookup keys
used with this object.
|
Operations
The cluster monitor MBean supports the operations shown in Table 3–79. The names of these operations
are defined as static constants in the utility class ClusterOperations.
Table 3–79 Cluster Monitor Operations
|
Name
|
Parameters
|
Result Type
|
Description
|
|
getBrokerAddresses
|
None
|
String[]
|
Addresses of brokers in cluster
Each address specifies the host name and Port Mapper port number of
a broker in the cluster, in the form hostName:portNumber.
Example:
For conventional
clusters, the list includes all brokers specified by the broker property imq.cluster.brokerlist. For HA clusters, it includes all active and
inactive brokers in the cluster table stored in the HA database.
|
|
getBrokerIDs [HA clusters only]
|
None
|
String[]
|
Broker identifiers of brokers in cluster
The list includes all active and inactive brokers in the cluster table
stored in the HA database.
|
|
getBrokerInfoByAddress
|
brokerAddress (String)
|
CompositeData
|
Descriptive information about broker
The desired broker is designated by its host name and Port Mapper port
number (brokerAddress), in the form hostName:portNumber.
The value returned is a JMX CompositeData object describing the broker;
seeTable 3–80 for lookup keys used
with this object.
|
|
getBrokerInfoByID
|
brokerID (String)
|
CompositeData
|
Descriptive information about broker
The desired broker is designated by its broker identifier (brokerID). The value
returned is a JMX CompositeData object describing the broker;
seeTable 3–80 for lookup keys used
with this object. For conventional clusters, the operation returns null.
|
|
getBrokerInfo
|
None
|
CompositeData[]
|
Descriptive information about all brokers in cluster
The value returned is an array of JMX CompositeData objects describing the brokers;
see Table 3–80 for lookup keys used
with these objects.
For conventional
clusters, the array includes all brokers specified by the broker property imq.cluster.brokerlist. For HA clusters, it includes all active and
inactive brokers in the cluster table stored in the HA database.
|
The LocalBrokerInfo and MasterBrokerInfo attributes and the getBrokerInfoByAddress, getBrokerInfoByID, and getBrokerInfo operations return objects
implementing the JMX interface CompositeData, which maps lookup keys to
associated data values. The keys shown in Table 3–80 are defined as static constants in the utility class BrokerClusterInfo for use with these objects.
Table 3–80 Lookup Keys for Cluster
Monitor Information
|
Key
|
Value Type
|
Description
|
|
Address
|
String
|
Broker address, in the form hostName:portNumber
Example:
|
|
ID [HA clusters only]
|
String
|
Broker identifier
|
|
State
|
Integer
|
Current state of broker
See Table 3–81 for possible values.
|
|
StateLabel
|
String
|
String representation of current broker state
Useful for displaying the state in human-readable form, such as in the Java Monitoring and Management Console (jconsole).
See Table 3–81 for possible values.
|
|
TakeoverBrokerID
|
String
|
Broker identifier of broker that has taken over this broker's
persistent data store
|
|
NumMsgs
|
Long
|
Current number of messages stored in memory and persistent store
|
|
StatusTimestamp
|
Long
|
Time of last status update, in standard Java format (milliseconds
since January 1, 1970, 00:00:00 UTC)
Used to determine whether a broker is running.
The interval at which a broker updates its status can be configured
with the broker property imq.cluster.monitor.interval.
|
Table 3–81 shows the possible
values returned for the lookup keys State and StateLabel. These values are defined as static
constants in the utility class BrokerState.
Table 3–81 Broker State Values
|
Value
|
Utility Constant
|
String Representation
|
Meaning
|
|
0
|
BrokerState.OPERATING
|
OPERATING
|
Broker is operating
|
|
1
|
BrokerState.TAKEOVER_STARTED
|
TAKEOVER_STARTED
|
Broker has begun taking over persistent data store from another
broker
|
|
2
|
BrokerState.TAKEOVER_COMPLETE
|
TAKEOVER_COMPLETE
|
Broker has finished taking over persistent data store from another
broker
|
|
3
|
BrokerState.TAKEOVER_FAILED
|
TAKEOVER_FAILED
|
Attempted takeover has failed
|
|
4
|
BrokerState.QUIESCE_STARTED
|
QUIESCE_STARTED
|
Broker has begun quiescing
|
|
5
|
BrokerState.QUIESCE_COMPLETE
|
QUIESCE_COMPLETE
|
Broker has finished quiescing
|
|
6
|
BrokerState.SHUTDOWN_STARTED
|
SHUTDOWN_STARTED
|
Broker has begun shutting down
|
|
7
|
BrokerState.BROKER_DOWN
|
BROKER_DOWN
|
Broker is down
|
|
-1
|
BrokerState.UNKNOWN
|
UNKNOWN
|
Broker state unknown
|
Notifications
The cluster monitor MBean supports the notifications shown in Table 3–82. These notifications are instances
of the Message Queue JMX classes ClusterNotification and BrokerNotification, and their names are
defined as static constants in those classes.
Table 3–82 Cluster Monitor Notifications
|
Name
|
Utility Constant
|
Description
|
|
mq.cluster.broker.join
|
ClusterNotification.CLUSTER_BROKER_JOIN
|
A broker has joined the cluster
|
|
mq.cluster.broker.down
|
ClusterNotification.CLUSTER_BROKER_DOWN
|
A broker in the cluster has shut down or crashed
|
|
mq.broker.takeover.start [HA clusters only]
|
BrokerNotification.BROKER_TAKEOVER_START
|
A broker has begun taking over persistent data store from another
broker
|
|
mq.broker.takeover.complete
|
BrokerNotification.BROKER_TAKEOVER_COMPLETE
|
A broker has finished taking over persistent data store from another
broker
|
|
mq.broker.takeover.fail
|
BrokerNotification.BROKER_TAKEOVER_FAIL
|
An attempted takeover has failed
|
Table 3–83 shows the methods
defined in class ClusterNotification for obtaining details
about a cluster monitor notification. See Table 3–6 for the corresponding methods of class BrokerNotification.
Table 3–83 Data Retrieval Methods
for Cluster Monitor Notifications
|
Method
|
Result Type
|
Description
|
|
isHighlyAvailable
|
Boolean
|
High-availability (HA) cluster?
|
|
getClusterID
|
String
|
Cluster identifier
|
|
getBrokerID
|
String
|
Broker identifier of affected broker
|
|
getBrokerAddress
|
String
|
Address of affected broker, in the form hostName:portNumber
Example:
|
|
isMasterBroker [Conventional clusters only]
|
Boolean
|
Master broker affected?
|
Logging
This section describes the MBeans used for logging Message Queue operations:
The following subsections describe each of these MBeans in detail.
Log Configuration
Each broker has a single log configuration MBean, used
for configuring Message Queue logging.
Object Name
The log configuration MBean has the following object name:
com.sun.messaging.jms.server:type=Log,subtype=Config
A string representing this object name is defined as a static constant LOG_CONFIG_MBEAN_NAME in the utility class MQObjectName.
Attributes
The log configuration MBean has the attributes shown in Table 3–84. The names of these attributes
are defined as static constants in the utility class LogAttributes.
Table 3–84 Log Configuration Attributes
|
Name
|
Type
|
Settable?
|
Description
|
|
Level
|
String
|
Yes
|
Logging level
Specifies the categories of logging information that can be written
to an output channel. See Table 3–85 for
possible values.
|
|
RolloverBytes
|
Long
|
Yes
|
File length, in bytes, at which output rolls over to a new log file
A value of -1 denotes an unlimited number
of bytes (no rollover based on file length).
|
|
RolloverSecs
|
Long
|
Yes
|
Age of file, in seconds, at which output rolls over to a new log file
A value of -1 denotes an unlimited number
of seconds (no rollover based on file age).
|
Table 3–85 shows the possible
values for the Level attribute. Each level includes those
above it (for example, WARNING includes ERROR).
These values are defined as static constants in the utility class LogLevel.
Table 3–85 Log Configuration Logging
Levels
|
Name
|
Utility Constant
|
Meaning
|
|
NONE
|
LogLevel.NONE
|
No logging
|
|
ERROR
|
LogLevel.ERROR
|
Log error messages
|
|
WARNING
|
LogLevel.WARNING
|
Log warning messages
|
|
INFO
|
LogLevel.INFO
|
Log informational messages
|
|
UNKNOWN
|
LogLevel.UNKNOWN
|
Logging level unknown
|
Notification
The log configuration MBean supports the notification shown in Table 3–86.
Table 3–86 Log Configuration Notification
|
Name
|
Description
|
|
jmx.attribute.change
|
Attribute value changed
|
Log Monitor
Each broker has a single log monitor MBean, used
for monitoring Message Queue logging.
Object Name
The log monitor MBean has the following object name:
com.sun.messaging.jms.server:type=Log,subtype=Monitor
A string representing this object name is defined as a static constant LOG_MONITOR_MBEAN_NAME in the utility class MQObjectName.
Notifications
The log monitor MBean supports the notifications shown in Table 3–87. These notifications are instances
of the Message Queue JMX class LogNotification, and their names are defined
as static utility constants in that class.
Note –
A notification listener registered for a particular logging level
will receive notifications only for that level and not for those above or
below it: for example, a listener registered for the notification mq.log.level.WARNING will be notified only of WARNING messages and
not ERROR or INFO. To receive notifications
for more than one logging level, the listener must be explicitly registered
for each level separately.
Table 3–87 Log Monitor Notifications
|
Name
|
Utility Constant
|
Description
|
|
mq.log.level.ERROR
|
LogNotification.LOG_LEVEL_ERROR
|
Error message logged
|
|
mq.log.level.WARNING
|
LogNotification.LOG_LEVEL_WARNING
|
Warning message logged
|
|
mq.log.level.INFO
|
LogNotification.LOG_LEVEL_INFO
|
Informational message logged
|
Table 3–88 shows the methods
defined in class LogNotification for obtaining details about
a log monitor notification.
Table 3–88 Data Retrieval Methods
for Log Monitor Notifications
|
Method
|
Result Type
|
Description
|
|
getLevel
|
String
|
Logging level of logged message
See Table 3–85 for possible values.
|
|
getMessage
|
String
|
Body of logged message
|
Java Virtual Machine
This section describes the MBean used for monitoring the Java Virtual
Machine (JVM):
The following subsection describes this MBean in detail.
JVM Monitor
Each broker has a single JVM monitor MBean, used
for monitoring the Java Virtual Machine (JVM).
Note –
This MBean is useful only with the Java Development Kit (JDK) version 1.4 or lower. JDK version 1.5 includes
built-in MBeans that provide more detailed information on the state of the JVM.
Object Name
The JVM monitor MBean has the following object name:
com.sun.messaging.jms.server:type=JVM,subtype=Monitor
A string representing this object name is defined as a static constant JVM_MONITOR_MBEAN_NAME in the utility class MQObjectName.
Attributes
The JVM monitor MBean has the attributes shown in Table 3–89. The names of these attributes
are defined as static constants in the utility class JVMAttributes.
Table 3–89 JVM Monitor
Attributes
|
Name
|
Type
|
Settable?
|
Description
|
|
TotalMemory
|
Long
|
No
|
Current total memory, in bytes
|
|
InitMemory
|
Long
|
No
|
Initial heap size at JVM startup, in bytes
|
|
FreeMemory
|
Long
|
No
|
Amount of memory currently available for use, in bytes
|
|
MaxMemory
|
Long
|
No
|
Maximum allowable heap size, in bytes
Any memory allocation attempt that would exceed this limit will cause
an OutOfMemoryError exception to be thrown.
|