Maximo Application Suite
Customer-managed

Optional: Installing IBM MQ for IBM Maximo Manage

Set up Maximo® Manage to connect and use IBM® MQ as a messaging provider. It is assumed that you installed and configured an existing queue manager and that the user, password, and connection information are known before proceeding.

Before you begin

Create a queue manager by completing the following steps in IBM Cloud®.
  1. Click Create to create Queue manager.
  2. Click Queue manager.
  3. Click Administration.
  4. Click Launch IBM MQ Console.
  5. On the Queue Manager page, click Connection information. Choose any format and download connection information for future configuration.

Next, you can continue to create the queues. For more information about how to configure and manage IBM MQ, see Getting started with IBM MQ.

Procedure

  1. Configure queues in your queue manager.

    When you create queues on the queue manager, each queue has properties that need to be set.

    1. Create a queue by using the properties and values shown:
      • Queue name: sqout
      • Default persistence: Persistent
      • Queue type:Local
      • Message delivery sequence: FIFO
    2. Repeat the same steps for the sqin, cqin, cqinerr queues.
    3. For the cqinerr queue, set the following properties:
      • Backout queue: cqinerr
      • Backout Threshold: 5
    4. Add Pass all context authorization for the application user on this queue, which gives authorization to the user to move messages from cqin to cqinerr. It also provides Browse and Inquire authorization.
    5. Configure the CLOUD.APP.SVRCONN communication channel's mcauser value to the value of your IBM MQ user.
  2. Download the IBM MQ resource adapter for queuesLiberty.
    1. Download the wmq.jmsra.rar IBM MQ resource adapter file that is needed by Liberty to connect to IBM MQ resources. You can add this file to your customization archive file to deploy. For more information, see Where can I download the WebSphere® MQ resource adapter?.
    2. To add the downloaded RAR file to the customization archive, create the following folder structure. These paths are relative to /opt/IBM/SMP/maximo.
      • additional-server-files\
      • deployment\was-liberty-default\config-deployment-descriptors\maximo-all\mboejb\ejbmodule\META-INF\
    3. Place the file wmq.jmsra.rar in the additional-server-files folder.
  3. Configure the client to enable message-driven beans (MDBs).

    To modify your existing Maximo Manage application to serve as an IBM MQ client, complete the following steps:

    1. Copy the ejb-jar.xml file or its contents from the following location on the maxinst pod:
      • /opt/IBM/SMP/maximo/deployment\was-liberty-default\config-deployment-descriptors\maximo-all\mboejb\ejbmodule\META-INF\ejb-jar.xml
    2. Place the file in the folder structure that you created:
      • deployment\was-liberty-default\config-deployment-descriptors\maximo-all\mboejb\ejbmodule\META-INF\
    3. Edit the file and enable the MDBs by uncommenting them. The resulting ejb-jar.xml file contents are similar to the following example:
      The enterprise-beans file contents:
      
         <message-driven id="MessageDriven_JMSContQueueProcessor_1">
           <ejb-name>JMSContQueueProcessor-1</ejb-name>
           <ejb-class>psdi.iface.jms.JMSContQueueProcessor</ejb-class>
           <transaction-type>Container</transaction-type>
           <message-destination-type>javax.jms.Queue</message-destination-type>
           <env-entry>
             <env-entry-name>MESSAGEPROCESSOR</env-entry-name>
                      <env-entry-type>java.lang.String </env-entry-type>
                      <env-entry-value>psdi.iface.jms.QueueToMaximoProcessor</env-entry-value>
           </env-entry> 
         </message-driven>
       
                      <message-driven id="MessageDriven_JMSContQueueProcessor_2">
           <ejb-name>JMSContQueueProcessor-2</ejb-name>
           <ejb-class>psdi.iface.jms.JMSContQueueProcessor</ejb-class>
           <transaction-type>Container</transaction-type>
           <message-destination-type>javax.jms.Queue</message-destination-type>
           <env-entry>
             <env-entry-name>MESSAGEPROCESSOR</env-entry-name>
                      <env-entry-type>java.lang.String </env-entry-type>
                      <env-entry-value>psdi.iface.jms.QueueToMaximoProcessor</env-entry-value>
           </env-entry> 
           <env-entry>
             <env-entry-name>MDBDELAY</env-entry-name>
                      <env-entry-type>java.lang.Long </env-entry-type>
                      <env-entry-value>30000</env-entry-value>
           </env-entry>      
           <env-entry>
             <env-entry-name>ERRORQUEUE</env-entry-name>
                      <env-entry-type>java.lang.String </env-entry-type>
                      <env-entry-value>1</env-entry-value>
           </env-entry>      
           
         </message-driven>
      
      The assembly-descriptor file contents:
      
         <container-transaction>
                      <method>
                         <ejb-name>JMSContQueueProcessor-1</ejb-name>
                         <method-name>*</method-name>
                      </method>
          
                      <trans-attribute>Required</trans-attribute>
          
         </container-transaction>
       
         <container-transaction>
                      <method>
                         <ejb-name>JMSContQueueProcessor-2</ejb-name>
                         <method-name>*</method-name>
                      </method>
          
                      <trans-attribute>Required</trans-attribute>
          
         </container-transaction>
      
    4. Save the changes.
  4. Create and deploy the customization files.
    1. Using a compressed file tool, create a compressed file from the deployment directory that you created earlier.
    2. Place the compressed file on a file transfer protocol (FTP) server or persistent volume that Maximo Application Suite has access to.
    3. Log in to the Maximo Application Suite as an administrative user.
      1. From the side navigation menu, click Applications and then click the Manage tile.
      2. Click Actions, and then click Update Configuration.
      3. Click the edit icon for Customization.
      4. If needed, enter the file address where the compressed file is stored and provide any credentials.
      5. Click Apply changes.
      The applications take time to be built and deployed. After the deployment is complete, you see that in the application pods such as mes and ui, the resource adapter is deployed to the following location:
      • /managefiles/additional-server-files/wmq.jmsra.rar
  5. Configure the Liberty servers to enable IBM MQ resources.

    The XML that is shown here adds the extra feature classes, JMS resources, and the IBM MQ resource adapter to the Liberty server. You add the XMLs to the server bundles in the Maximo Application Suite for Maximo Manage.

    1. Replace the bolded field values with the correct values for your user and queue manager.
      
      <?xml version="1.0" encoding="UTF-8"?>
      <server description="new server">
          <featureManager>
            <feature>javaMail-1.6</feature>
                              <feature>jdbc-4.2</feature>
                              <feature>jaxws-2.2</feature>
                              <feature>jndi-1.0</feature>
                              <feature>wasJmsClient-2.0</feature>
                              <feature>ssl-1.0</feature>
                              <feature>webProfile-8.0</feature>
                              <feature>openidConnectClient-1.0</feature>
                              <feature>transportSecurity-1.0</feature>
                              <feature>monitor-1.0</feature>
                              <feature>wmqJmsClient-2.0</feature>
                              <feature>jmsMdb-3.2</feature>
                              <feature>jsonp-1.1</feature>
                              <feature>ejbRemote-3.2</feature>
                              <feature>ejbHome-3.2</feature>
          </featureManager>
             <logging traceSpecification="JMSApi=all:WAS.j2c=all"/> 
             <variable name="wmqJmsClient.rar.location" value="/managefiles/additional-server-files/wmq.jmsra.rar"/>
             <jmsConnectionFactory jndiName="jms/maximo/int/cf/intcf" connectionManagerRef="MIFJMS">
                       <properties.wmqJms 
                              transportType="CLIENT"
                              hostName="<hostname>" 
                              port="<portnumber>"
                              channel="<channelname>"
                              applicationName="<username>"
                              queueManager="<qmgrname>"/>
              </jmsConnectionFactory>
              <connectionManager id="MIFJMS" maxPoolSize="20"/>
              <jmsQueue id="sqout" jndiName="jms/maximo/int/queues/sqout">
            <properties.wmqJms baseQueueName="sqout" baseQueueManagerName="<qmgrname>"/>
          </jmsQueue>
              <jmsQueue id="sqin" jndiName="jms/maximo/int/queues/sqin">
            <properties.wmqJms baseQueueName="sqin" baseQueueManagerName="<qmgrname>"/>
          </jmsQueue>
              <jmsQueue id="jms/maximo/int/queues/cqin" jndiName="jms/maximo/int/queues/cqin">
            <properties.wmqJms baseQueueName="cqin" baseQueueManagerName="<qmgrname>"/>
          </jmsQueue>
              <jmsQueue id="jms/maximo/int/queues/cqinerr" jndiName="jms/maximo/int/queues/cqinerr">
            <properties.wmqJms baseQueueName="cqinerr" baseQueueManagerName="<qmgrname>"/>
          </jmsQueue>
              <jmsActivationSpec id="maximomea/mboejb/JMSContQueueProcessor-1">
                      <properties.wmqJms
                              transportType="CLIENT"
                              destinationRef="jms/maximo/int/queues/cqin"
                              destinationType="javax.jms.Queue"
                              hostName="<hostname>"
                              port="<portnumber>"
                              maxSequentialDeliveryFailures="-1"
                              channel="<channelname>"
                              queueManager="<qmgrname>"/>
                              <authData id="auth1" user="<user>" password="<password>"/>
              </jmsActivationSpec>
              <jmsActivationSpec id="maximomea/mboejb/JMSContQueueProcessor-2">
                      <properties.wmqJms
                              transportType="CLIENT"
                              destinationRef="jms/maximo/int/queues/cqinerr"
                              destinationType="javax.jms.Queue"
                              hostName="<hostname>"
                              port="<portnumber>"
                              maxPoolDepth="1"
                              maxSequentialDeliveryFailures="-1"
                              channel="<channelname>"
                              queueManager="<qmgrname>"/>
                              <authData id="auth1" user="<user>" password="<password>"/>
              </jmsActivationSpec>
      </server>
      
    2. After you modify the XML for your IBM MQ server and user, log in to the Maximo Application Suite.
      1. From the Catalog, click Manage.
      2. From the Actions menu, click Update Configuration.
      3. Click edit for Server Bundles.
      4. Click the view link for the UI bundle under Additional properties.
      5. In the Additional server config field, enter the XML code and click Save.
      6. Complete the same action for the Maximo Enterprise Adapter (MEA) bundle.
      7. Click Apply changes.

      The preceding XML takes effect only in ui and mea server bundles.

    3. The deployment takes time to complete. After the servers are restarted, proceed to the next section.
  6. Configure Maximo Manage.
    1. Log in to Maximo, open the System Properties application and ensure that mxe.int.disablejmssessiontx is set to 1.
    2. Apply the changes.
    3. The JMS queues Java™ Naming and Directory Interface (JNDI) names in the XML used in previous steps are predefined in Manage. You can create new queues if you have used different queue names in the External Systems application, using the Add/Modify Queues action.