The service monitor MBean is used for monitoring a connection service. There is one such MBean for each service.
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) |
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 |
---|---|---|---|
String |
No |
Service name See Table 3–11 for possible values. |
|
Integer |
No |
Port number currently used by service |
|
Integer |
No |
Current state See Table 3–13 for possible values. |
|
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. |
|
Integer |
No |
Current number of connections |
|
Long |
No |
Cumulative number of connections opened since broker started |
|
Long |
No |
Cumulative number of connections rejected since broker started |
|
Integer |
No |
Current number of threads actively handling connections |
|
Integer |
No |
Current number of message producers |
|
Integer |
No |
Current number of message consumers |
|
Long |
No |
Cumulative number of messages received since broker started |
|
Long |
No |
Cumulative number of messages sent since broker started |
|
Long |
No |
Cumulative size in bytes of messages received since broker started |
|
Long |
No |
Cumulative size in bytes of messages sent since broker started |
|
Long |
No |
Cumulative number of packets received since broker started |
|
Long |
No |
Cumulative number of packets sent since broker started |
|
Long |
No |
Cumulative size in bytes of packets received since broker started |
|
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 |
RUNNING |
Service running |
|
1 |
PAUSED |
Service paused |
|
2 |
QUIESCED |
Service quiesced |
|
-1 |
UNKNOWN |
Service state unknown |
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 |
---|---|---|---|
None |
ObjectName[] |
Object names of connection monitor MBeans for all current connections |
|
None |
String[] | ||
None |
String[] |
Consumer identifiers of all current message consumers |
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 |
---|---|---|
Service paused |
||
Service resumed |
||
Connection opened |
||
Connection rejected |
||
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 |
---|---|---|
String |
Service name See Table 3–11 for possible values. |