Universal Messaging 9.12 | Developer Guide | Enterprise APIs | Enterprise Developer's Guide for Java | Provider for JMS | Application Server Integration (JBoss)
 
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:
*Message Queue Configuration
*Server Session Pool Configuration
*Jboss Configuration & Service Deployment
*Universal Messaging Server Configuration
*Running Message Driven Beans
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 nirvana-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 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.

Copyright © 2013-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.