Universal Messaging Provider for JMS - Application Server Integration (Jboss)
JMS provides extensions that allows JMS providers to be integrated into Application Servers. This section describes the steps involved in integrating Universal Messaging Provider for JMS with jboss. All references to jboss assume jboss version 3.2.x or 4.0.x are being used.
This guide will provide the following information:
Configuration Terms
Firstly, for the following sections, we will be referencing certain directories for the install. These are described below:
<jboss_home> - the jboss installation directory
<jboss_bin> - the jboss bin directory located under <jboss_home>/bin
<jboss_default> - default server, under <jboss_home>/server/default
<jboss_default_lib> - default server lib directory, under <jboss_default>/lib
<jboss_default_deploy> - default server deploy directory, under <jboss_default>/deploy
<jboss_default_conf> - default server configuration directory, usually
<jboss_default>/conf
Message Queue Configuration
Jboss provides its own JMS Message Queue service that we need to replace with Universal Messaging's own message queue service. This section will describe the steps needed to integrate Universal Messaging's Message service into Jboss.
To do this we need to change the references in the jboss xml configuration files so that the Universal Messaging Message Queue service is used:
In the <jboss_default_conf>/standardjboss.xml file and replace the tags that say DefaultJMSProvider with Universal MessagingJMSProvider.
Server Session Pool Configuration
Jboss provides its own server session pool objects that allow multiple JMS sessions to be pooled within the Message Queue Service. Universal Messaging also provides its own session pool objects. This section describes the steps necessary to integrate Universal Messaging's Server Session Pool into jboss.
To do this we need to change the references in the jboss xml configuration files so that Universal Messaging's Server Session Pools are used by the Message Queue Service:
In the <jboss_default_conf>/standardjboss.xml file and replace the tags that say StdJMSPool with Universal MessagingJMSPool.
Jboss Configuration
This section describes the steps necessary to ensure the jboss server is ready to begin using Universal Messaging as the Message Queue Service provider. Please complete the following steps:
1. Remove the <jboss_default_deploy>/JMS directory completely
2. Put the Universal Messaging-service.xml file into the <jboss_default_deploy> directory (found in the src/xml/jboss directory of your install)
3. Put the Universal Messaging nJMS.jar, nClient.jar and nJ2EE.jar files into the <jboss_default_lib> directory from your /lib directory of the install
4. Modify the run script for jboss to include the following -D parameter when the jboss server is started:
-Dnirvana.provider.url=<your.Universal Messaging.rname (e.g.) nsp://localhost:9000 which is the default RNAME
Universal Messaging Realm Server Configuration
In order to configure the Universal Messaging Realm Server, please ensure you have either read the Universal Messaging Enterprise Manager JNDI integration section or are familiar with the jmsadmin sample programs. These tools enable you to create the Universal Messaging JNDI objects necessary for the jboss server to successfully use Universal Messaging as the JMS message queue provider. In this example, we will use the jmsadmin example program, however should you choose to, you can also use the Universal Messaging Enterprise Manager by following the steps found in the guide.
Please follow the steps below:
1. Start the Universal Messaging 3.0 server
2. Open a Universal Messaging Client environment prompt
3. Type : jmsadmin bind topicFactory TopicConnectionFactory (followed by return)
4. Type : jmsadmin bind queueFactory QueueConnectionFactory (followed by return)
5. Type : jmsadmin bind queue queue/DLQ (followed by return)
This will set up the queue and topic factories used by the Universal Messaging Provider for JMS message service, as well as setting up the jboss DLQ used for internal message processing.
Once these steps have been completed, you can then start the jboss server which will now be using Universal Messaging Provider for JMS as the message queue provider
Running Message Driven Beans
Message driven beans can be deployed within application servers to provide a run-frame for JMS services. Once you have created your message driven beans and they are deployed into the jboss server, you must ensure that all topics and queues used by the MDBs have been created using the jmsadmin tool, so that they can be referenced within the Universal Messaging JNDI context used by the Universal Messaging messaging service.