Pages

Friday, December 16, 2011

Setting up both a Cluster and Integration Framework for Maximo 7.1 on WebLogic 9


This document applies only to the following language version(s):

English

Question

How do you configure JMS resources for use with Integration Framework?

Answer

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.

In the example configuration below, we will use the following names:
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

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.


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 and 4096MB on some platforms so that it can handle a larger volume of messages without running out of memory.

Refer to the BEA web site for general information on load balancing in a cluster.

Defining the JDBC data source for use with JMS resources
1. From the WebLogic Administrative Console, click the “lock and edit” button
2. Navigate to services/jdbc/data sources and 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 this 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.

1. In the WebLogic console, click the “lock and edit” button.
2. Navigate in the left pane services/JDBC/persistent stores, click the link "create a new JMS jdbc store"
3. Enter the name as mxintcqinstore
4. Select the target for this store as MAXIMOIF
5. Select the data source created above
6. Enter a prefix value of "mxintcqin", then click "finish"
7. Create another new JMS jdbc store
8. Enter the name as mxintsqinstore
9. Select the target for this store as MAXIMOIF
10. Select the data source created above
11. Enter a prefix value of "mxintsqin", then click "finish"
12. Create a third JMS jdbc store
13. Enter the name as mxintsqoutstore
14. Select the target for this store as MAXIMOUI1(migrateable)
15. Select the data source created above
16. Enter a prefix value of "mxintsqout", then click "finish"
17. Create a fourth JMS jdbc store
18. Enter the name as mxintcqinerrstore
19. Select the target for this store as MAXIMOIF
20. Select the data source created above
21. Enter a prefix value of "mxintcqinerr", then click "finish"
22. Click “Activate Changes”

Creating your JMS resources for use in a clustered environment
1. Click the “lock and edit” button
2. Create four JMS servers with the following configuration parameters:
Parameter Value Properties
Name: Persistent store: Target:
sqinserver mxintsqinstore MAXIMOIF
sqoutserver mxintsqoutstore MAXIMOUI1(Migrateable)
cqinserver mxintcqinstore MAXIMOIF
cqinerrserver mxintcqinerrstore MAXIMOIF

3. Create a JMS system module named ifjmsmodule with MAXIMOIF selected as the target server.
4. Add a connection factory resource to the JMS module:
Parameter Value
Name: JNDI Name:
intjmsconfact jms/maximo/int/cf/intcf

Targets: Accept the default and click finish (the target will show the same selection as the target for this JMS module)

5. Add three 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
sqin

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

Subdeployment name:
sqin

JMS server name:
sqinserver

Queue 2
Name:
cqin

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

Subdeployment name:
cqin

JMS server name:
cqinserver

Queue 3
Name:
cqinerr

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

Subdeployment name:
cqinerr

JMS server name:
cqinerrserver


Template:
None

6. 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.
7. Save and activate the changes.
8. Create a second JMS system module named uijmsmodule with UICluster checkbox selected as the target and the radio button "all servers in the cluster" selected.
9. Add a connection factory resource to the JMS module:
Parameter Value
Name:
intjmsconfact

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

Targets:
Accept the default and click finish (the target will show the same selection as the target for this JMS module)

10. 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 1
Name:
sqout

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

JMS server name:
sqoutserver

Template:
None

11. 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.
12. Save and activate the changes.
13. 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
MXINTCQINERRWLSTORE
MXINTSQINWLSTORE
MXINTSQOUTWLSTORE

Build and deploy multiple EAR files from the same Maximo directory.
You will need to build multiple ear file builds of Maximo where some of the files to be included in each ear file will be different from the next, you do not need multiple instances of the Maximo installation folder.

For each file that will be modified making it different for one ear from the next, make a copy of that file and name it appropriately.

For example, since the User Interface application server requires one ear file that enables only outbound messaging crontask and the Integration Framework application server requires an ear file that enables all the other crontasks.

An example of the files that would be unique to each ear file for the above scenario might look like this:

C:\ibm\SMP\maximo\applications\maximo\properties
maximo.properties
maximo.propertiesUI
maximo.propertiesIF

C:\ibm\SMP\maximo\applications\maximo\mboejb\ejbmodule\META-INF
ejb-jar.xml
ejb-jarUI.xml
ejb-jarIF.xml

weblogic-ejb-jar.xml
weblogic-ejb-jarUI.xml
weblogic-ejb-jarIF.xml

Where there are 3 copies of each file, one with the default name, the next named for the User Interface ear, and one named for the Integration Framework ear.

In this scenario, for two ears you would make two copies of the file buildmaximoear.cmd and give them names such as the following:

buildmaximoear-UI.cmd
buildmaximoear-IF.cmd

These would be the files you use to build your individual ear files.

These are the steps to change the new cmd files to build your unique ear files:

1. Edit the buildmaximoear-UI.cmd file, and at the top of the file, enter the following shell commands:

copy /Y \IBM\SMP\maximo\applications\maximo\mboejb\ejbmodule\META-INF\ejb-jar-UI.xml \IBM\SMP\maximo\applications\maximo\mboejb\ejbmodule\META-INF\ejb-jar.xml

copy /Y \IBM\SMP\maximo\applications\maximo\mboejb\ejbmodule\META-INF\weblogic-ejb-jarUI.xml
\IBM\SMP\maximo\applications\maximo\mboejb\ejbmodule\META-INF\weblogic-ejb-jar.xml

copy /Y \IBM\SMP\maximo\applications\maximo\properties\maximo.propertiesUI \IBM\SMP\maximo\applications\maximo\properties\maximo.properties

2. Change the EAR_FILENAME variable to reflect the unique ear file name for the UI, for example:

set EAR_FILENAME=maximoUI.ear

3. Edit the buildmaximoear-IF.cmd file, and at the top of the file, enter the following shell commands:

copy /Y \IBM\SMP\maximo\applications\maximo\mboejb\ejbmodule\META-INF\ejb-jar-IF.xml \IBM\SMP\maximo\applications\maximo\mboejb\ejbmodule\META-INF\ejb-jar.xml

copy /Y \IBM\SMP\maximo\applications\maximo\mboejb\ejbmodule\META-INF\weblogic-ejb-jarIF.xml
\IBM\SMP\maximo\applications\maximo\mboejb\ejbmodule\META-INF\weblogic-ejb-jar.xml

copy /Y \IBM\SMP\maximo\applications\maximo\properties\maximo.propertiesIF \IBM\SMP\maximo\applications\maximo\properties\maximo.properties

4. Change the EAR_FILENAME variable to reflect the unique ear file name for the IF, for example:

set EAR_FILENAME=maximoIF.ear

5. Now when you run the build scripts to build the ear files, the resulting ear file will be named maximoUI.ear and maximoIF.ear respectively.

Prepare and Deploy the UI application cluster
1. Locate the maximo/applications/maximo/properties/maximo.propertiesUI 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.
2. Add the line mxe.crontask.donotrun if it is does not already exist in the properties file so that only the JMSQSEQCONSUMER.SEQQOUT crontask will run on this server:
e.g.
mxe.crontask.donotrun=JMSQSEQCONSUMER.SEQQIN,IFACETABLECONSUMER.IFACEIN,BBcron.BBCRON1,......

Note: 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.

3. Save and close the file.
4. Build the maximoUI.ear by running buildmaximoear-UI.cmd
5. Deploy this maximoUI.ear to the cluster (refer to the system administrator's guide for deployment information)
6. Restart the cluster

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

1. Locate the file under Maximo/applications/maximo/mboejb/ejbmodule/META-INF/ejb-jarIF.xml
Open the file using a text editor and uncomment the following:

Make sure the following 4 sections 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 for error queue -->
<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>
</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>

<!-- MEA MDB for error queue -->
<container-transaction>
<method>
<ejb-name>JMSContQueueProcessor-2</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>

2. Save and close the file.
3. Locate the file under Maximo/applications/maximo/mboejb/ejbmodule/META-INF/weblogic-ejb-jarIF.xml
Open the file using a text editor and uncomment the following:

Make sure the following 2 sections look like this:
<!-- 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>

<!-- MEA MDB for error queue -->
<weblogic-enterprise-bean>
<ejb-name>JMSContQueueProcessor-2</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/cqinerr</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-2</jndi-name>
</weblogic-enterprise-bean>
4. Locate the Maximo/applications/maximo/properties/maximo.propertiesIF 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.
5. 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

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

6. Save and close the file
7. Build the maximoIF.ear by running buildmaximoear-IF.cmd
8. Deploy the maximoIF.ear to the MAXIMOIF application server (refer to the system administrator's guide for deployment information)
9. Restart the MAXIMOIF application server

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

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.

Please note that advanced configuration such as distributed queueing is beyond the scope of Support Services however these configurations can be provided by the IBM Services groups.

No comments:

Post a Comment