MBean Reference

Like all JBoss components the JBossMQ layer is configured using MBeans. The configuration files that setup the JBossMQ MBeans include:

  • conf/jbossmq-state.xml: the configuration file read by the org.jboss.mq.sm.file.DynamicStateManager MBean. This controls the valid username/passwords as well as the active durable topic subscriptions.

  • deploy/jms/jbossmq-destinations-service.xml: the default JMS queue and topic destination configurations.

  • deploy/jms/jbossmq-service.xml: the service descriptor for the core JBossMQ MBeans.

All JBoss JMS objects and sever components are configured via JMX MBeans. Like most other services running in the JBoss micro-kernel architecture, an XML file deployed to the server/default/deploy controls the configuration of the service.

The sever components are configured in the jbossmq-service.xml file. Unless you are an advanced user, you should not have to edit this file. Adjusting this file allows you to optimize and change how the server operates. For more details on how to configure this file, see the section below. If you edit this file, you should restart the JBoss server for the changes to correctly take effect.

Most users will need to edit the jbossmq-destinations-service.xml file. This file allows you to define the destinations that your applications need. If you edit this file, you should restart the JBoss server for the changes to correctly take effect.

org.jboss.mq.il.jvm.JVMServerILService

The org.jboss.mq.il.jvm.JVMServerILService MBean is used to configure the JVM IL.

The configurable attributes are as follows:

  • Invoker: The JMX Object Name of the Invoker that is used to pass client requests to the Destination Manager. This attribute should be setup via a XML tag.

  • ConnectionFactoryJNDIRef: The JNDI location to which this IL will bind a coresponding JMS ConnectionFactory Managed Object.

  • XAConnectionFactoryJNDIRef: The JNDI location to which this IL will bind a coresponding JMS XAConnectionFactory Managed Object.

  • PingPeriod: How often, in milliseconds, the client should send a ping message to the server to validate that the connection is still valid. If this is set to zero, then no ping message will be sent. Since it is impossible for a JVM IL connection to go bad, it is recommended that you keep this set to ?0?.

org.jboss.mq.il.rmi.RMIServerILService

The org.jboss.mq.il.rmi.RMIServerILService is used to configure the RMI IL.

The configurable attributes are as follows:

  • Invoker: The JMX Object Name of the Invoker that is used to pass client requests to the Destination Manager. This attribute should be setup via a XML tag.

  • ConnectionFactoryJNDIRef: The JNDI location to which this IL will bind a coresponding JMS ConnectionFactory Managed Object.

  • XAConnectionFactoryJNDIRef: The JNDI location to which this IL will bind a coresponding JMS XAConnectionFactory Managed Object.

  • PingPeriod: How often, in milliseconds, the client should send a ping message to the server to validate that the connection is still valid. If this is set to zero, then no ping message will be sent.

org.jboss.mq.il.oil.OILServerILService

The org.jboss.mq.il.oil.OILServerILService is used to configure to the OIL IL. The configurable attributes are as follows:

  • Invoker: The JMX Object Name of the Invoker that is used to pass client requests to the Destination Manager. This attribute should be setup via a XML tag.

  • ConnectionFactoryJNDIRef: The JNDI location to which this IL will bind a coresponding JMS ConnectionFactory Managed Object.

  • XAConnectionFactoryJNDIRef: The JNDI location to which this IL will bind a coresponding JMS XAConnectionFactory Managed Object.

  • PingPeriod: How often, in milliseconds, the client should send a ping message to the server to validate that the connection is still valid. If this is set to zero, then no ping message will be sent.

  • ServerBindPort: The protocol listening port for this IL. If not specified, the default is 0, which means that a random port will be chosen.

  • BindAddress: The specific address that this IL listens on. This can be used on a multi-homed host for a java.net.ServerSocket that will only accept connection requests on one of its addresses.

  • EnableTcpNoDelay: If set to true, then the TcpNodDelay option is enabled. This improves request response times since TCP/IP packets are sent as soon as the request is flushed. Otherwise request packets may be buffered by the operating system to create larger IP packets.

org.jboss.mq.il.uil.UILServerILService

The org.jboss.mq.il.uil.UILServerILService is used to configure the UIL IL.

The configurable attributes are as follows:

  • Invoker: The JMX Object Name of the Invoker that is used to pass client requests to the Destination Manager. This attribute should be setup via a XML tag.

  • ConnectionFactoryJNDIRef: The JNDI location to which this IL will bind a coresponding JMS ConnectionFactory Managed Object.

  • XAConnectionFactoryJNDIRef: The JNDI location to which this IL will bind a coresponding JMS XAConnectionFactory Managed Object.

  • PingPeriod: How often, in milliseconds, the client should send a ping message to the server to validate that the connection is still valid. If this is set to zero, then no ping message will be sent.

  • ServerBindPort: The protocol listening port for this IL. If not specified default is 0, which means that a random port will be chosen.

  • BindAddress: The specific address this IL listens on. This can be used on a multi-homed host for a java.net.ServerSocket that will only accept connection requests on one of its addresses.

  • EnableTcpNoDelay: If set to true, then the TcpNodDelay option is enabled. This improves request response times since TCP/IP packets are sent as soon as the request is flushed. Otherwise request packets may be buffered by the operating system to create larger IP packets.

org.jboss.mq.server.jmx.Invoker

The org.jboss.mq.server.jmx.Invoker is used to pass Invocation Layer (IL) requests down to the Destination Manager through an Interceptor Chain.

The configurable attributes are as follows:

  • NextInterceptor: The JMX object name of the next request Interceptor. This attribute is used by all the Interceptors to create the Interceptor Chain. The last interceptor in the chain should be the DestinationManager. This attribute should be setup via a XML tag.

org.jboss.mq.server.jmx.InterceptorLoader

The org.jboss.mq.server.jmx.InterceptorLoader is used to load a Generic Interceptor and make it part of the Interceptor Chain. This MBean is typically used to load the org.jboss.mq.server.TracingInterceptor, which is used to efficiently log all client requests via trace level log messages.

The configurable attributes are as follows:

  • NextInterceptor: The JMX object name of the next interceptor. The value of this attribute is what forms a link in the Interceptor Chain. The last interceptor in the chain should be the DestinationManager. This attribute should be setup via a XML tag.

  • InterceptorClass: The class name of the interceptor that will be loaded and made part of the Interceptor Chain. The class specified here must extend the org.jboss.mq.server.JMSServerInterceptor java class.

org.jboss.mq.security.SecurityManager

If the org.jboss.mq.security.SecurityManager is part of the Interceptor Chain, then it will enforce the access control lists assigned to the destinations. The Security Manager uses JAAS, and as such requires that the application policy be setup for in the JBoss login-config.xml file. The default configuration is shown in Listing 6.1.

Listing 6.1, login-config.xml JBossMQ Default settings

"JBossMQ">

"org.jboss.mq.sm.file.DynamicLoginModule"
flag = "required">
"unauthenticatedIdentity">guest
"sm.objectnam">
jboss.mq:service=StateManager




The default configuration maps any unauthenticated JBossMQ client to the ?guest? role.

The configurable attributes are as follows:

  • NextInterceptor: The JMX object name of the next interceptor. The value of this attribute is what forms a link in the Interceptor Chain. The last interceptor in the chain should be the DestinationManager. This attribute should be setup via a XML tag.

org.jboss.mq.server.jmx.DestinationManager

The org.jboss.mq.server.jmx.DestinationManager must be the last Interceptor in the Interceptor Chain.

The configurable attributes are as follows:

  • PersistenceManager: The JMX object name of the Persistence Manager you want the server to use. This attribute should be setup via a XML tag.

  • StateManager: The JMX object name of the State Manager that you want the server to use. This attribute should be setup via a XML tag.

org.jboss.mq.server.MessageCache

The server determines when to move messages to secondary storage by using the org.jboss.mq.server.MessageCache MBean.

The configurable attributes are as follows:

  • CacheStore: The JMX object name of an Object that will act as the Cache Store. The Cache Store is used by the MessageCache to move messages to persistent storage. The value you set here typically depends on the type of Persistence Manager you are using. This attribute should be setup via a XML tag.

  • HighMemoryMark: The amount of JVM heap memory in megabytes that must be reached before the Message Cache starts to move messages to secondary storage.

  • MaxMemoryMark: The maximum amount of JVM heap memory in megabytes that the Message Cache considers to be the Max Memory Mark. As memory usage approaches the Max Memory Mark, the Message Cache will move messages to persistent storage so that the number of messages kept in memory approaches zero.

org.jboss.mq.pm.file.CacheStore

The org.jboss.mq.pm.file.CacheStore MBean should be used as the Cache Store for the Message Cache when you are using the File or Rolling Logged PM.

The configurable attributes are as follows:

  • DataDirectory: The directory used to store messages for the Message Cache.

org.jboss.mq.sm.file.DynamicStateManager

The org.jboss.mq.sm.file.DynamicStateManager MBean should be used as the State Manager assigned to the Destination Manager.

The configurable attributes are as follows:

  • StateFile: The file used to store state information such as created durable subscriptions. The StateFile is in XML format to which the server reads and writes data. You should never edit the XML file while the server is running.

org.jboss.mq.pm.file.PersistenceManager

The org.jboss.mq.pm.file.PersistenceManager should be used as the Persistence Manager assigned to the Destination Manager if you wish to use the File PM.

The configurable attributes are as follows:

  • MessageCache: The JMX object name of the MessageCache that has been assigned to the Destination Manager. This attribute should be setup via a XML tag.

  • DataDirectory: The directory used to store persistent messages.

org.jboss.mq.pm.rollinglogged.PersistenceManager

The org.jboss.mq.pm.rollinglogged.PersistenceManager should be used as the Persistence Manager assigned to the Destination Manager if you wish to use the Rolling Logged PM.

The configurable attributes are as follows:

  • MessageCache: The JMX object name of the MessageCache that has been assigned to the Destination Manager. This attribute should be setup via a XML tag.

  • DataDirectory: The directory used to store persistent messages.

org.jboss.mq.pm.jdbc2.PersistenceManager

The org.jboss.mq.pm.file.PersistenceManager should be used as the Persistence Manager assigned to the Destination Manager if you wish to use the JDBC2 PM. This PM has been tested against the HypersonicSQL Database.

The configurable attributes are as follows:

  • MessageCache: The JMX object name of the MessageCache that has been assigned to the Destination Manager. This attribute should be setup via a XML tag.

  • DataSource: The JMX object name of the JCA data source that will be used to obtain JDBC connections. This attribute should be setup via a XML tag. You may also need to add another XML tag to wait for the data source Connection Manager to be started before this PM is started.

  • SqlProperties: A property list is used to define the SQL Queries and other JDBC2 Persistence Manager options. You will need to adjust these properties if you wish to run against another database other than HypersonicSQL. See Listing 6.2 for the default setting for this attribute.

Listing 6.2 Default SqlProperties

"SqlProperties">
BLOB_TYPE=OBJECT_BLOB
INSERT_TX = INSERT INTO JMS_TRANSACTIONS (TXID) values(?)
INSERT_MESSAGE = INSERT INTO JMS_MESSAGES (MESSAGEID, DESTINATION,
MESSAGEBLOB, TXID, TXOP) VALUES(?,?,?,?,?)
SELECT_ALL_UNCOMMITED_TXS = SELECT TXID FROM JMS_TRANSACTIONS
SELECT_MAX_TX = SELECT MAX(TXID) FROM JMS_MESSAGES
SELECT_MESSAGES_IN_DEST = SELECT MESSAGEID, MESSAGEBLOB FROM
JMS_MESSAGES WHERE DESTINATION=?
SELECT_MESSAGE = SELECT MESSAGEID, MESSAGEBLOB FROM JMS_MESSAGES WHERE
MESSAGEID=? AND DESTINATION=?
MARK_MESSAGE = UPDATE JMS_MESSAGES SET TXID=?, TXOP=? WHERE MESSAGEID=?
AND DESTINATION=?
UPDATE_MESSAGE = UPDATE JMS_MESSAGES SET MESSAGEBLOB=? WHERE MESSAGEID=?
AND DESTINATION=?
UPDATE_MARKED_MESSAGES = UPDATE JMS_MESSAGES SET TXID=?, TXOP=? WHERE
TXOP=?
UPDATE_MARKED_MESSAGES_WITH_TX = UPDATE JMS_MESSAGES SET TXID=?, TXOP=?
WHERE TXOP=? AND TXID=?
DELETE_MARKED_MESSAGES_WITH_TX = DELETE FROM JMS_MESSAGES WHERE TXID IN
(SELECT TXID FROM JMS_TRANSACTIONS) AND TXOP=?
DELETE_TX = DELETE FROM JMS_TRANSACTIONS WHERE TXID = ?
DELETE_MARKED_MESSAGES = DELETE FROM JMS_MESSAGES WHERE TXID=? AND
TXOP=?
DELETE_MESSAGE = DELETE FROM JMS_MESSAGES WHERE MESSAGEID=? AND
DESTINATION=?
CREATE_MESSAGE_TABLE = CREATE TABLE JMS_MESSAGES ( MESSAGEID INTEGER NOT
NULL, \
DESTINATION VARCHAR(255) NOT NULL, TXID INTEGER, TXOP CHAR(1), \
MESSAGEBLOB OBJECT, PRIMARY KEY (MESSAGEID, DESTINATION) )
CREATE_TX_TABLE = CREATE TABLE JMS_TRANSACTIONS ( TXID INTEGER )

org.jboss.mq.server.jmx.Queue

The org.jboss.mq.server.jmx.Queue is used to define a Queue Destination on the JBossMQ server. The ?name? attribute of the JMX object name of this MBean is used to determine the destination name. For example, if the JMX MBean begins with:

"org.jboss.mq.server.jmx.Queue"
name="jboss.mq.destination:service=Queue,name=testQueue">

Then, the JMX object name is jboss.mq.destination:service=Queue,name=testQueue and the name of the queue is testQueue.

The configurable attributes are as follows:

  • DestinationManager: The JMX object name of the Destination Manager configured for the server. This attribute should be setup via a XML tag.

  • SecurityManager: The JMX object name of the Security Manager that is being used to validate client requests. This attribute should be setup via a XML tag.

  • SecurityConf: An XML based description of an access control list that will be used by the SecurityManager to authorize client operations against the Destination. See Listing 5.1 for an example of the configuration.

  • JNDIName: The location in JNDI to which the queue object will be bound. If this is not set, it will default to queue/queue-name.

org.jboss.mq.server.jmx.Topic

The org.jboss.mq.server.jmx.Topic is used to define a Topic Destination on the JBossMQ server. The ?name? attribute of the JMX object name of this MBean is used to determine the destination name. For example, if the JMX MBean begins with:

"org.jboss.mq.server.jmx.Topic"
name="jboss.mq.destination:service=Topic,name=testTopic">

Then, the JMX object name is jboss.mq.destination:service=Topic,name=testTopic and the name of the topic is testTopic.

The configurable attributes are as follows:

  • DestinationManager: The JMX object name of the Destination Manager configured for the server. This attribute should be setup via a XML tag.

  • SecurityManager: The JMX object name of the Security Manager that is being used to validate client requests. This attribute should be setup via a XML tag.

  • SecurityConf: An XML based description of an access control list that will be used by the SecurityManager to authorize client operations against the Destination. See Listing 5.1 for an example of the configuration.

  • JNDIName: The location in JNDI to which the queue object will be bound. If this is not set, it will default to ?topic/topic-name?.