Deploying a JMS message-driven bean (MDB) that represents a JMS MDB listener in Pega 7
When Pega 7 is deployed as an enterprise application, you deploy Java Message Service (JMS) message-driven beans (MDBs) that represent JMS MDB listeners in the Pega 7 application. These MDBs route incoming messages to the appropriate JMS rules.
Configuring a JMS MDB listener
Before you deploy a JMS MDB listener, you must configure it in the application server, and then generate it in your Pega 7 application.
- Using the application server's administrative tools, configure the JMS provider resources to be used by the JMS MDB listener. At a minimum, you must configure:
- The destination that the MDB will be listening on
- A response destination
- A connection factory
- Activation specifications
- Log in to the Pega 7 Developer Portal and configure a JMS MDB listener and its related data records.
- Click MDB component link that contains an archive file.
- If you are working with WebSphere or WebLogic, the generated archive file is a new MDB module that is available as a JAR file with a name that is identical to the MDB Listener that contains the MDB module deployment descriptors.
- If you are working with JBoss, the generated archive file contains both standard and JBoss-specific deployment descriptors of the Pega 7 prbeans module, but updated with new MDB fragments.
to display an - Click the MDB component link and save the generated archive file in the file system.
Deploying a JMS MDB listener
After configuration is complete, follow the application server-specific instructions for deploying the JMS MDB, which include the steps for updating a Pega 7 application. Note that deployment of a newly created JMS MDB listener varies depending on the platform:
- WebSphere – The JMS MDB listener is added as a new Java Platform, Enterprise Edition (JEE) module to the Pega 7 application.
- WebLogic – The JMS MDB listener is added as a new JEE module to the Pega 7 application.
- JBoss EAP 6.1 – The JMS MDB listener is added to the Pega 7 prbeans module.
Deploying a JMS MDB listener by using WebSphere
- Log in to WebSphere.
- From the administrative console, stop the Pega 7 application and click .
- On the Preparing for the application update screen:
- Click the Replace or add a single module radio button.
- Specify the path beginning with the installed application archive file for the module to be replaced or added (for example:
prj2ee/mytest.jar
). - In the Specify the path to the module section, click Browse and select the full path to the generated MDB module in either the local file system or the remote file system.
- Click Next. On the Bind listeners for message-driven beans screen, select the Activation specification radio button. Configure the following fields:
- Target Resource JNDI Name (for example:
jms/Test
) - Destination JDNI Name (for example:
jms/MyTest
)
- Target Resource JNDI Name (for example:
- Click Next. On the Summary page, save the deployment.
- Return to the Enterprise Applications screen and start the Pega 7 application.
- Click the Pega 7 application name to open it, and then click Deployment Descriptor to view the application deployment descriptor data to verify that the MDB module has been added to the application deployment descriptor.
The updated Pega 7 application structure now contains the added MDB module.
Deploying a JMS MDB listener by using WebLogic
- Log in to WebLogic.
- Add the generated archive file to the expanded Pega 7 archive directory.
- Modify the standard application deployment descriptor
application.xml
file by adding the text highlighted below:<!--ETier end-->
<module id="EjbModule_1">
<ejb>prbeans.jar</ejb>
</module>
<module id="EjbModule_2">
<ejb>mytest.jar</ejb>
</module>
<module>
<web>
<web-uri>prweb.war</web-uri>
<context-root>prweb</context-root>
</web>
<module> - Modify the application container-specific deployment descriptor
weblogic-application.xml
file by adding the text highlighted below:
<module-ref>
<module-uri>prbeans.jar</module-uri>
</module-ref>
<module-ref>
<module-uri>mytest.jar</module-uri>
</module-ref>
<!--ETier start-->
<module-ref>
<module-uri>pradapter.rar</module-uri>
</module-ref>
<!--ETier end-->
<module-ref>
<module-uri>prweb.war</module-uri>
</module-ref> - Use the Administration Console's Update/Redeploy options to update the Pega 7 application.
The updated Pega 7 application structure now contains the added MDB module.
Deploying a JMS MDB listener by using JBoss EAP 6.1
Deployment when working with JBoss depends on whether the deployment descriptors for the prbeans module are updated when they are generated.
- Determine if the deployment descriptors for the prbeans module are updated.
If the deployment descriptors are updated, use the deployment descriptors from the generated
prbeans_DD.jar
file (ejb-jar.xml
andjboss-ejb3.xml
) to replace the corresponding deployment descriptors in the Pega 7 application’sprbeans.jar
file.- If the deployment descriptors are not updated when generated, an error message is displayed:
This message indicates that your archive contains fragments of the MDB deployment descriptors, which must be manually inserted into the corresponding descriptors in the Pega 7 application’sprbeans.jar
file.
- After the deployment descriptors in the Pega 7 application’s
prbeans.jar
file are updated, redeploy and restart your Pega 7 application.
application.xml
file:<module id="EjbModule_1">
<ejb>prbeans.jar</ejb>
</module>
<module id="EjbModule_2">
<ejb>mytest.jar</ejb>
</module>
<module>
<web>
<web-uri>prweb.war</web-uri>
<context-root>prweb</context-root>
</web>
</module>
jboss-deployment-structure.xml
file:<sub-deployment name="prbeans.jar">
<dependencies>
<module name="org.jboss.remote-naming"/>
<module name="deployment.prj2ee.ear.prweb.war"/>
<module name="deployment.prj2ee.ear.pradapter.rar"/>
</dependencies>
<resources>
<resource-root path="APP-INF/lib/prbootstrap.jar"/>
<resource-root path="APP-INF/lib/prresources.jar"/>
<resource-root path="APP-INF/lib/prbootstrap-api.jar"/>
</resources>
</sub-deployment>
<sub-deployment name="mytest.jar">
<dependencies>
<module name="org.jboss.remote-naming"/>
</dependencies>
<resources>
<resource-root path="APP-INF/lib/prbootstrap.jar"/>
<resource-root path="APP-INF/lib/prresources.jar"/>
<resource-root path="APP-INF/lib/prbootstrap-api.jar"/>
</resources>
</sub-deployment>
The updated Pega 7 application structure now contains the added MDB module.
-->