This content has been archived.

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.

  1. 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
  2. Log in to the Pega 7 Developer Portal and configure a JMS MDB listener and its related data records.
  3. Click Generate MDB to display an 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.
  4. 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

  1. Log in to WebSphere.
  2. From the administrative console, stop the Pega 7 application and click Update.
  3. 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.
  4. 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)
  5. Click Next. On the Summary page, save the deployment.
  6. Return to the Enterprise Applications screen and start the Pega 7 application.
  7. 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

  1. Log in to WebLogic.
  2. Add the generated archive file to the expanded Pega 7 archive directory.
  3. 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>
  4. 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>
  5. 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.

  1. 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 and jboss-ejb3.xml) to replace the corresponding deployment descriptors in the Pega 7 application’s prbeans.jar file.

    • If the deployment descriptors are not updated when generated, an error message is displayed:
      Message indicating that your archive contains fragments of the MDB deployment descriptors
      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’s prbeans.jar file.
  2. ​​After the deployment descriptors in the Pega 7 application’s prbeans.jar file are updated, redeploy and restart your Pega 7 application.
  • Add the generated module to the Pega 7 archive.
  • Modify the application standard deployment descriptor 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>
  • Modify the application container-specific Deployment Descriptor 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>
  • In the JBoss Admin Console, navigate to the "Manage Deployment" page and select the Pega 7 application.
  • Click Replace and select the updated Pega 7 application archive in the file system.
  • Click Save, enable the updated application, and verify that the updated application contains the added MDB module.
  • The updated Pega 7 application structure now contains the added MDB module.

    -->
    Suggest Edit

    80% found this useful

    Have a question? Get answers now.

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