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.
The service configuration MBean is used for configuring a connection service. There is one such MBean for each service.
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) |
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 |
---|---|---|---|
String |
No |
Service name See Table 3–7 for possible values. |
|
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. |
|
Integer |
Yes |
Minimum number of threads assigned to service Must be greater than 0. |
|
Integer |
Yes |
Maximum number of threads assigned to service Must be greater than or equal to MinThreads. |
|
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) |
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 |
---|---|---|---|
None |
None |
Pause service (jms, ssljms, httpjms, and httpsjms services only) |
|
None |
None |
Resume service (jms, ssljms, httpjms, and httpsjms services only) |
The service configuration MBean supports the notification shown in Table 3–10.
Table 3–10 Service Configuration Notification
Name |
Description |
---|---|
Attribute value changed |
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. |
Each broker has a single service manager configuration MBean, used for managing all of the broker's service configuration MBeans.
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.
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 |
Integer |
No |
Total minimum number of threads for all active services |
|
Integer |
No |
Total maximum number of threads for all active services |
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 |
---|---|---|---|
None |
ObjectName[] |
Object names of service configuration MBeans for all services |
|
None |
None |
Pause all services except admin and ssladmin |
|
None |
None |
Resume all services |
Each broker has a single service manager monitor MBean, used for managing all of the broker's service monitor MBeans.
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.
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 |
---|---|---|---|
Integer |
No |
Number of connection services |
|
Integer |
No |
Total current number of threads actively handling connections for all services |
|
Long |
No |
Total cumulative number of messages received by all services since broker started |
|
Long |
No |
Total cumulative number of messages sent by all services since broker started |
|
Long |
No |
Total cumulative size in bytes of messages received by all services since broker started |
|
Long |
No |
Total cumulative size in bytes of messages sent by all services since broker started |
|
Long |
No |
Total cumulative number of packets received by all services since broker started |
|
Long |
No |
Total cumulative number of packets sent by all services since broker started |
|
Long |
No |
Total cumulative size in bytes of packets received by all services since broker started |
|
Long |
No |
Total cumulative size in bytes of packets sent by all services since broker started |
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 |
---|---|---|---|
None |
ObjectName[] |
Object names of all service monitor MBeans |
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 |
---|---|---|
Service paused |
||
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 |
---|---|---|
String |
Service name See Table 3–11 for possible values. |