Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

How to set up a JMS service

Updated on October 28, 2020

Java Message Service-based services respond to messages sent by Java Message Service clients to a destination (queue or topic).

A JMS listener monitors a JMS topic or queue. When a message arrives at the destination, the listener routes it to the JMS service. The service rule then invokes a service activity that takes the appropriate action in your application – typically it creates or updates a work object.

Suggested approach

To set up a JMS service integration:

  • Configure a JMS server and JMS destination (topic or queue) in a J2EE application server (JMS provider)
  • Configure the application that causes the events to send messages to the destination about those events (that is, act as a JMS producer),
  • Enable JMS support in Process Commander, and then
  • Configure your application to act as a JMS consumer through one or more JMS services.

Set Up the External Components

This article describes how to create the rules and data objects necessary for a JMS service. For information about creating the JMS server, setting up the JMS destination, and configuring the other application to post messages to that topic, obtain and consult the vendor's documentation for the kind of application server that you are using as the JMS provider (WebLogic or WebSphere for example).

When you are finished, gather the following information, which you need to set up the JMS service:

  • Destination name
  • Name of the JMS connection factory used with the destination
  • JNDI server name
  • Name of the JNDI initial context factory class of the application server
  • Provider URL of the JMS provider
  • Security principal and security credentials for the JNDI server, if
    required by the server

Enable JMS Support in Process Commander

To use a JMS service, Process Commander must be able to function as a JMS client.

  • If Process Commander is deployed as an enterprise application or as a Web application in a J2EE application server, it is enabled as a JMS client and the JMS jar is available at runtime. However, the JMS jar must also be made available to the Process Commander compile time class path.
  • If Process Commander is deployed as a Web application in Tomcat or another non-J2EE application server, you must obtain the vendor’s documentation for that application server and take whatever steps are necessary to configure the Process Commander system as a JMS client, which should put the JMS jar on the Process Commander runtime class path. Then, you must also make the JMS jar available to the Process Commander compile time class path.

To complete this step, see About the Process Commander 5.1 Class Paths Follow the instructions in the section titled “Adding Third-Party jar Files and Java Class Files to the Class Paths.”

Determine how to identify the JMS resources

There are two ways to identify the JMS resources (connection factories, destinations, and so on) the service interacts with:

  • Through resource references that you insert in the Process Commander deployment descriptor file (either ejb-jar.xml or web.xml).
  • By direct JNDI name lookup through a JNDI server data object (instance of Data-Admin-Connect-JNDIServer).

For information about making this choice, see Configure a JMS service or connector to find JMS resources through resource references.

Run the Service Accelerator to Create the JMS Service

A JMS service requires the following components, most of which can be generated from the Service Accelerator:

  • Service package
  • JMS service rule (and the service activity that evaluates the message and takes the action)
  • JNDI server
  • JMS listener or JMS MDB listener

Click Application > New > Service, then follow the instructions in Create services with the Service Accelerator.

For Web Deployments: Start the JMS listener

When Process Commander is deployed as a Web application, you can start the new JMS listener without having to restart Process Commander.

Start the System Management application (Tools > System Management) and select the node on which the JMS listener should run. Use the Listener Management page to start the listener. If the listener should run on more than one node, start it on each.

For Enterprise Deployments: Configure and deploy the JMS MDB listener

When Process Commander is deployed as an enterprise application, you deploy JMS listeners as message-driven beans (MDBs) within the Process Commander application. These MDBs route incoming messages to the appropriate JMS service rule.

Test the Configuration

When you finish creating the JMS service and you've either started or deployed the new listener, test your configuration.

  1. Open the JMS service rule.
  2. Click Run > Trace Open Rule.
  3. Have the external application post a message to the topic being monitored by the JMS listener.
  4. Watch the Tracer as it adds new rows of information.
  5. Examine the data and verify that it worked the way you expected it to.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us