IBM Support

Setting up Maximo 7.x in a WebLogic v9 and later Clusters using JMS queues for Integration

Technical Blog Post


Abstract

Setting up Maximo 7.x in a WebLogic v9 and later Clusters using JMS queues for Integration

Body

When using the Maximo Integration Framework (IF) in a clustered environment the following should be considered.

 

For best performance with minimal impact to users, the Maximo Integration Framework (IF) can be configured to run on a single WebLogic application server instance of Maximo while users log in and work with a User Interface (UI) cluster of Maximo instances.

 

In the below example, you will need 4 WebLogic application servers.

One application server will serve as the Administration console for the rest of the "managed" servers.

One application server will be used for the stand-alone Maximo application used specifically for inbound IF transaction processing. 

The other two application servers will be used to set up a cluster of application servers for use as the UI cluster.  All outbound transactions will be generated by the UI cluster members running Maximo. 

In the sample configuration below, there are 2 application servers in the UI cluster and 1 application server in the stand-alone application server.

Below you will find instructions for configuring JMS resources for the IF instance and the UI cluster.

 

Before you begin:

Below are the names used in the rest of this document:

Name the Admin server AdminMAXSERV

Name the first Maximo application server for the UI cluster MAXIMOUI1

Name the second Maximo application server for the UI cluster MAXIMOUI2

Name the stand-alone Maximo application server MAXIMOIF

 

It is best to have two Maximo installation folders that are identical, since there will be a need for 2 different maximo.ear files, one with the Message Driven Bean enabled for inbound transaction processing on the MAXIMOIF application server, and one for the Maximo cluster where no inbound transaction processing will occur, this will eliminate confusion as to which ear file has this module enabled.

 

Creating your application servers

This document assumes you already have WebLogic 9.x installed and that you have an Administration server, and one managed server used for the Maximo application.

 

If you do not have a separate Administration server instance, create a new application server specifically for this purpose which will have a unique port.

You will need to modify the start script of your original application server and change the ADMIN_URL variable to point to the correct hostname and port of your new Administration server.

i.e. set ADMIN_URL=http://localhost:7001

 

Maximo will not be deployed to the administration server, it will be used only to manage all other application server instances.

Your original application server instance can be designated as your IF server.  However, if you prefer to have it named according to this document, you will need to delete and recreate this server with the name MAXIMOIF.

You will also need to create 2 new managed application servers, belonging to a new cluster.

You can name them MAXIMOUI1 and MAXIMOUI2.

 

Configuring your startup scripts

See guide for your application server to complete the configuration of the startup scripts.

NOTE:  When setting the maximum heap size for the MAXIMOIF application server JVM, the admin guide says to set this to 1024MB, however, since this application server will not be used by users directly, the memory size can be increased to 2048MB so that it can handle a larger volume of messages without running out of memory.  Refer to this BEA web site for general information on load balancing in a cluster.

 

Defining the jdbc data source for use with JMS resources

Click the “lock and edit” button

1)  log in to the WebLogic console and navigate to services/jdbc/data sources

2)  click "create a new jdbc data source"

3)  enter the name and JNDI name as follows:

                        jmsqueuedatasource

           

4)  select the type as your database platform type such Oracle thin or sql server driver etc, click next  - NOTE:  this must be a non-XA driver

5)  turn off “supports global transaction” because feature is not supported for jms stores, then click next

6)  configure the correct database name, hostname, port and user information, click next

7)  confirm the information and click the “test connection” button.

8)  If successful click next

9)  select all 3 servers (IF, UI1 and UI2) as the targets for this data source

10)  click “finish”

11)  click “Activate Changes”

 

Creating your data stores for use with JMS resources

NOTE:  the prefix values are very important, if you do not have unique names for prefix values on each store, messages can become corrupt as they will all use the same store files.

In the WebLogic console, navigate in the left pane services/JDBC/persistent stores

Click the “lock and edit” button

1)  click the link "create a new JMS jdbc store"

2)  enter the name as mxintcqinstore

3)  select the target for this store as MAXIMOIF

4)  select the data source created above

5)  enter a prefix value of "mxintcqin", then click "finish"

 

6)  create another new JMS jdbc store

7)  enter the name as mxintsqinstore

8)  select the target for this store as MAXIMOIF

9)  select the data source created above

10)  enter a prefix value of "mxintsqin", then click "finish"

           

11)  create a third JMS jdbc store

12)  enter the name as mxintsqoutstore

13)  select the target for this store as MAXIMOUI1

14)  select the data source created above

15)  enter a prefix value of "mxintsqout", then click "finish"

16)  Click “Activate Changes”

 

Creating your JMS resources for use in a clustered environment

Click the “lock and edit” button

1. Create three JMS servers with the following configuration parameters:

Parameter Value Properties

Name:                                                   Target:

sqinserver                                             MAXIMOIF

sqoutserver                                           MAXIMOUI1

cqinserver                                             MAXIMOIF

 

2. Create a JMS system module named ifjmsmodule with MAXIMOIF as the target server.

3. Add a connection factory resource to the JMS module:

Parameter Value

Name:  intjmsconfact

JNDI Name:  jms/maximo/int/cf/intcf

Target:   MAXIMOIF

 

4. Add two queue resources to the JMS Module:

a. Create the queue resource type.

b. Create a new subdeployment with the same name as the queue, click next.

c. select the radio button for the JMS server you are creating this subdeployment for.

Parameter Value

Queue 1

Name:  sqin

JNDI Name:  jms/maximo/int/queues/sqin

Subdeployment name:  sqin

JMS server name:  mxintsqin

 

Queue 2

Name:   cqin

JNDI Name:  jms/maximo/int/queues/cqin

Subdeployment name:  cqin

JMS server name:  mxintcqin

 

5. Enable the JMS connection factory for XA:

a. Select the intjmsconfact link.

b. From the Transactions tab, check the XA Connection Factory Enabled checkbox

c. Set the Maximum Messages per Session to -1.

6. Save and activate the changes.

7. Create a second JMS system module named uijmsmodule with MAXIMOUI1 as the target server.

8. Add a connection factory resource to the JMS module:

Parameter Value

Name:  intjmsconfact

JNDI Name:  jms/maximo/int/cf/intcf

Target:  MAXIMOUI1(migrateable)

 

9. Add one queue resource to the JMS Module:

a. Create the queue resource type.

b. Create a new subdeployment with the same name as the queue, click next.

c. select the radio button for the JMS server you are creating this subdeployment for.

Parameter Value

Queue Name:  sqout

JNDI Name:  jms/maximo/int/queues/sqout

Template:  None

 

10. Enable the JMS connection factory for XA:

a. Select the intjmsconfact link.

b. From the Transactions tab, check the XA Connection Factory Enabled checkbox

c. Set the Maximum Messages per Session to -1.

 

11. Save and activate the changes.

12.  Restart the WebLogic Admin, IF and UI application servers

NOTE:  For each JDBC data store created above, a table will automatically be created in your MAXIMO schema with the prefix names you entered when you created the new stores and will be created in the database when the application servers are restarted:

 

            MXINTCQINWLSTORE

            MXINTSQINWLSTORE

            MXINTSQOUTWLSTORE

 

Preparing the Maximo application for deployment to the IF application server

To make sure that the MDB used by the IF application is deployed correctly, edit the following file and make sure the MDBs are uncommented:

1.  locate the file under Maximo/applications/maximo/mboejb/ejbmodule/META-INF/ejb-jar.xml

Open the file using a text editor and uncomment the following:

Make sure the following 4 sections look like this (The MEA MDB should already be uncommented from the steps noted in the previous document):

 

<!-- MEA MDB  -->

    <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>

 

<!-- MEA MDB -->

    <container-transaction>

            <method>

               <ejb-name>JMSContQueueProcessor-1</ejb-name>

               <method-name>*</method-name>

            </method>

            <trans-attribute>Required</trans-attribute>

    </container-transaction>

 

2.  Save and close the file.

3.  Locate the file in the same directory called weblogic-ejb-jar.xml and uncomment the following sections as shown below:

<!-- MEA MDB -->

  <weblogic-enterprise-bean>
    <ejb-name>JMSContQueueProcessor-1</ejb-name>
    <message-driven-descriptor>
      <pool>        
          <max-beans-in-free-pool>3</max-beans-in-free-pool>    
      </pool>      
      <destination-jndi-name>jms/maximo/int/queues/cqin</destination-jndi-name>
      <connection-factory-jndi-name>jms/maximo/int/cf/intcf</connection-factory-jndi-name>
    </message-driven-descriptor>
     <transaction-descriptor>
           <trans-timeout-seconds>600</trans-timeout-seconds>
     </transaction-descriptor>
     <jndi-name>JMSContQueueProcessor-1</jndi-name>
  </weblogic-enterprise-bean>

 

4.  Save and close the file.

5.  Locate the Maximo/applications/maximo/properties/maximo.properties file and change the mxe.name property to a name that represents that this is the ear file for the IF instance, i.e. MXServerIF.

6.  Add the line mxe.crontask.donotrun if it does not already exist in the properties files so that all crontasks except for the JMSQSEQCONSUMER.SEQQOUT crontask will run on this server:

          e.g.   mxe.crontask.donotrun=JMSQSEQCONSUMER.SEQQOUT

This will be the only crontask entry because this is the only crontask that we do not want to run.

7.  Save and close the file

8.  Build the maximo.ear

9.  Deploy the maximo.ear to the MAXIMOIF application server (refer to the system administrator's guide for deployment information)

10.  Restart the MAXIMOIF application server

 

Preparing the Maximo application for deployment to the UI cluster

To make sure that the MDB used by the IF application does not run in the UI cluster, edit the following files and make sure the MDBs are commented out:

1.  locate the file under maximo/applications/maximo/mboejb/ejbmodule/META-INF/ejb-jar.xml

2.  Open the file using a text editor and comment out the following

Make sure the following 4 entries look like this:

<!-- MEA MDB 

    <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>

-->

 

<!-- MEA MDB

    <container-transaction>

            <method>

               <ejb-name>JMSContQueueProcessor-1</ejb-name>

               <method-name>*</method-name>

            </method>

               <trans-attribute>Required</trans-attribute>

       </container-transaction>

-->

 

3.  Save the close the file.

4.  Locate the maximo/applications/maximo/properties/maximo.properties file and change the mxe.name property to a name that represents that this is the ear file for the UI cluster, i.e. MXServerUI.

5.  Add the line mxe.crontask.donotrun if it is does not already exist in the properties file

so that no crontasks except for the JMSQSEQCONSUMER.SEQQOUT crontask will run on this server:

e.g.

              mxe.crontask.donotrun=JMSQSEQCONSUMER.SEQQIN,IFACETABLECONSUMER.IFACEIN,BBcron.BBCRON1,......

 

Since we want all crontasks to run in the IF instance, all crontasks will be listed here except for the JMSQSEQCONSUMER.SEQQOUT.  This crontask will need to run in the cluster.

 

Crontasks are cluster aware as long as they are specified where to run using the maximo.properties.  If using the Target Enable feature to force the IF crontasks to run in specific servers, they are not cluster aware and no failover will occur if the server running a specific IF crontask fails.  Be sure to go through your list of crontasks and note each instance in the correct case and add it to the mxe.crontask.donotrun parameter in the maximo.properties file, each separated by a comma.

 

6.  Save and close the file.

7.  Build the maximo.ear

8.  Deploy this maximo.ear to the cluster (refer to the system administrator's guide for deployment information)

9.  Restart the cluster

 

Web services:

When deploying web services, you will need to set up the web service administration URL and port to point to the MAXIMOIF application server IP address and port. 

When sending transactions to these interfaces, you will need to point your web service client to the IP address and port of the MAXIMOIF application server IP address and port, not the cluster address for the UI instances.  This is to prevent any inbound transaction processing from web service invocation from taking place on the UI cluster.  It is also important to make sure that the Integration Global Directory is in a location that all application servers in a multi-node environment can access.  See the next section for information on the Integration Global Directory.

 

The Integration Global Directory:

When you deploy a web service, all wsdl and schema files are written with the service you have just deployed.  These file will be written to the Integration Global Directory.  If WebLogic application servers will be distributed in a multi-node environment, the integration global directory must exist in a shared location that all application servers can access. 

 

This shared location can be either a mapped drive or UNC share (Windows), or a mount point (Unix).  The user specified to run the WebLogic services must have access to read and write to this share or mount point.  This includes the node manager if in use.  In Windows, do not use a local system account but rather a domain account as local system accounts to not have access to mapped drives or UNC shares.  You set the integration global directory path in the System Properties application, the property is called mxe.int.globaldir.

 

Important notes:

Importing data can only be performed while logged into the IF instance where the Message Driven Bean is deployed.  Exporting data can only be performed while logged into one of the UI cluster members.  If you need to be able to perform outbound transactions for any reason from the IF instance such as due to recurrence or crontasks that update data causing events to be fired, you will need to add another jms server to the MAXIMOIF application server, and create another queue with the same jndi name jms/maximo/int/queues/sqout as exists in the first jms uijmsmodule in the ifjmsmodule.  This configuration will require that you duplicate the JMSQSEQCONSUMER.SEQQOUT crontask instance so you will have two instances running for the same queue jndi name.  The first instance will need to be forced to run in the UI cluster and the second forced to run in the IF instance.  This is accomplished using the donotrun property. 

 

These instructions work with both WebLogic v9 and v10.

[{"Business Unit":{"code":"BU055","label":"Cognitive Applications"},"Product":{"code":"SSLKT6","label":"Maximo Asset Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":""}]

UID

ibm11113963