The meaning of the JMS cluster is to enhance the concurrency capability of the system in processing messages, and to build such a cluster, there are three steps:
1. Configure the database used for JMS message persistence
2. Configuring a distributed JNDI environment
3. Configuring Distributed JMS Clusters
In the JBoss cluster, the system holds messages in a hibernate way, so it is compatible with all databases supported by Hibernate. JBoss defaults to Hsql, in our case, Oracle 9.2 will be used. First you need to configure the Jndi data source to connect to the database. The method is to copy the Oracle-ds.xml file under Doc\examples\jca to Server\all\farm and modify the parameters to ensure the database can be connected properly. After the JBoss cluster is started, the file can be automatically copied to other cluster nodes and deployed automatically through the farm service of JBoss. Assume that the name of the Jndi data source is: Globalds copies the Oracle-jdbc3-service.xml file under DOC\EXAMPLES\JMS to the SERVER\ALL\DEPLOY-HASINGLETON\JMS directory. and delete the hsqldb-jdbc2-service.xml in the directory. Modify Oracle-jdbc3-service.xml, on 56 lines The value of name specified is the name of the data source: Globalds. This data source is used by the system to hold the JMS message. Use the following command to start Boss:run C all. After startup is complete, three more tables are normally found in the Oracle database:
1. Jms_message_log This table is used to hold all unhandled point-to-point messages, and the table structure is:
MessageID Message ID
Destination destinations
TXID Transaction ID
TXOP Message action type (A is new, D is deleted)
Messageblob message Content
2, Jms_reference_log is used to save all the unhandled topic messages, the table structure is:
MessageID
Destination
Txid
Txop
Messageblob
Whether the redelivered message was sent back
3. Jms_transaction_log is used to save some important transactions in the process of processing messages