Wednesday, November 12, 2008

PeopleSoft IB to MQ Integration

How to Setup MQ / Peoplesoft Connectivity

Document History:
Version
Author(s)
Description/Summary
Date Completed
1.0
Siva Kumar
How to Setup MQ Connectivity
03/29/2006
1.1
Siva Kumar
Added Support Procedure
04/27/2006


Last Updated
04/27/2006







Steps Required to setup MQM:

1) MQM Client Libraries.
2) Create jndi file using IVTSetup
3) Setup Java Message Converter.
4) Configure Websphere with MQM Resource
5) Configure Integration Broker with Inbound and Outbound nodes
6) Edit integrationbroker.properties file
7) Edit web.xml file
8) Start JMS Listener.
9) Support Procedure


Setup MQM Client Libraries.

Create user called mqm home directory /opt/mqm

You can download the MQM Client Libraries from MQ all you need following jar files to support MQ.

-r--r--r-- 1 mqm mqm 17978 Aug 2 2005 connector.jar
-r--r--r-- 1 mqm mqm 1785632 Aug 2 2005 com.ibm.mqjms.jar
-r--r--r-- 1 mqm mqm 41822 Aug 2 2005 com.ibm.mqbind.jar
-r--r--r-- 1 mqm mqm 344929 Aug 2 2005 com.ibm.mq.jar
-r--r--r-- 1 mqm mqm 33243 Aug 2 2005 CL3Nonexport.zip
-r--r--r-- 1 mqm mqm 13577 Aug 2 2005 CL3Export.zip
-r--r--r-- 1 mqm mqm 702319 Aug 2 2005 rmm.jar
-r--r--r-- 1 mqm mqm 77116 Aug 2 2005 providerutil.jar
-r--r--r-- 1 mqm mqm 444428 Aug 2 2005 postcard.jar
-r--r--r-- 1 mqm mqm 123717 Aug 2 2005 ldap.jar
-r--r--r-- 1 mqm mqm 8809 Aug 2 2005 jta.jar
-r--r--r-- 1 mqm mqm 98496 Aug 2 2005 jndi.jar
-r--r--r-- 1 mqm mqm 25998 Aug 2 2005 jms.jar
-r--r--r-- 1 mqm mqm 22769 Aug 2 2005 fscontext.jar
drwxr-xr-x 5 mqm mqm 512 Feb 15 2006 ..
-rw-r--r-- 1 mqm mqm 144700 Feb 16 2006 libmqjbnd05.so
-rw-r--r-- 1 mqm mqm 12808 Feb 16 2006 libmqjbdf02.so
-rw-r--r-- 1 mqm mqm 22084 Feb 16 2006 libMQXAi02.so



Create jndi file using IVTSetup
Get the required queue names from MQM admins

cd /opt/mqm/java/bin

Edit JMSAdmin file Location of .binding file

PROVIDER_URL=file:/opt/mqm/java/peoplesoft/jndi

Edit IVTSetup file and put the correct

# cat IVTSetup
#!/bin/sh

# ------------------------------------------------------------
# IBM Websphere MQ Support for Java Message Service
# Installation Verification Test - Setup script
#
# Licensed Materials - Property of IBM
#
# 5648-C60 5724-B4 5655-F10
#
# (c) Copyright IBM Corp. 1999. All Rights Reserved.
#
# US Government Users Restricted Rights - Use, duplication or
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
# ------------------------------------------------------------

echo "+ Calling JMSAdmin in batch mode to create objects"

cat << EOT java -DMQJMS_LOG_DIR=$MQ_JAVA_DATA_PATH/log -DMQJMS_TRACE_DIR=$MQ_JAVA_DATA_PATH/trace -DMQJMS_INSTALL_PATH=$MQ_JAVA_INSTALL_PATH com.ibm.mq.jms.admin.JMSAdmin
def qcf(trQCF) HOSTNAME(Your MQ Server ) PORT(1417) CHANNEL(SYSTEM.DEF.SVRCONN) QMANAGER(NYXENAP1.QM) TRANSPORT(client)
def q(troutQ) qu(Outbound Queue) PERSISTENCE(NON) TARGCLIENT(MQ)
def q(troutSwit) qu(Swift Queue) PERSISTENCE(NON) TARGCLIENT(MQ)
def q(trinQ) qu(inbound queue) PERSISTENCE(NON) TARGCLIENT(JMS)
def q(trinPS) qu(inbound1) PERSISTENCE(NON) TARGCLIENT(JMS)
def q(trinQNTP) qu(Queue hold message converted) PERSISTENCE(NON) TARGCLIENT(MQ)
def tcf(trTCF)
def t(trT) topic(MQJMS/PSIVT/Information)
end
EOT

echo "+ Done!"

. ./PATH.sh
./IVTSetup

This will create a .binding file in PROVIDER_URL=file:/opt/mqm/java/peoplesoft/jndi directory. Verify the file before continuing.

Note : Are you required to rebuild the .binding file if any queue name changes. For rebuilding you need to delete .binding file the run the IVTSetup script.

Make a note queue short names these names will be referred in WAS / PeopleSoft and JMS converter.


Setup Java Message Converter.

This part is key without this message will not work. As PeopleSoft supports only XML messages and swift takes only plain message. We need a java code which will convert messages from plain to XML and XML to plain.

We asked our java developer to write a small code which will read from Queue a and converts message (either adding or deleting xml tags) then put it another queue. This code will running all the time as soon as it sees a message it will convert.

This is used in the java code to convert.

headerAdjuster.jms.factory=trQCF : Connect Factory we defined in IVTSetup file
headerAdjuster.jms.username=
headerAdjuster.jms.password=
headerAdjuster.jms.sourceINQueue=trinQ Inbound Queue Name without tags
headerAdjuster.jms.sourceQueue.MessageSelector=
headerAdjuster.jms.destinationINQueue=trinPS Inbound Queue Name with tags (PS will read this)
headerAdjuster.requestingNode=MQ_INBOUND Node in IB
headerAdjuster.destinationNodes=
headerAdjuster.reply=false
headerAdjuster.debug=false
headerAdjuster.MessageVersion=VERSION_1 Message Version in IB
headerAdjuster.jms.sourceOUTQueue=troutQ Outbound Message with xml Tags
headerAdjuster.jms.destinationOUTQueue=troutSwit Outbound Message without Tags
headerAdjuster.messageName=Message Name Message Name in IB



Configure Websphere with MQM Resource


Login to admin server

http://hostname:9090/admin



Setup up MQ Environment files locations and Library Files.

Click on Environment -> Manage WebSphere Varibles. You need to set JAVA_HOME. MQ_INSTALL_ROOT






Click on Resources -> WebSphere MQ JMS Provider

Enter server name you are setting up ‘fs880tst’ and click on Apply



Click on WebSphere MQ Queue Connection Factories -> New

Fill up Name , JNDI Host Port , Channel , Transport Type. All this information you will get it from MQ admins and IVTSetup file



Click on apply to save the changes


Go back to ‘Web Sphere MQ JMS Provider’ and select ‘WebSphere MQ Queue Destinations’ and click on new .

Fill up Name, JNDI name, Base Queue Name ( Where Converted messages with xml tags for Peoplesoft Inbound kept). Queue Manage Name, host, port Channel Name. All this info you will get it from IVTSetup / MQ Admins.




Setting up JMS Listener ports


Servers -> Application Servers -> fs880tst ( Server you are setting up )

Message Listener Service

Listener Ports

Clikc on New and setup Create New Port called trQCF which your connect factory. Define all required fileds

Connection Factory and Destination JNDI name











Reboot the Server1


Login as wsadmin

Cd bin
./stopServer.sh server1
./startServer.sh server1


This will complete WebSphere Setup.

Click on Apply.



Configure Integration Broker with Inbound and Outbound nodes


Login to WebServer

http://hostname:8074/webserver/signon.html

AS VP1. -> PeopleTools -> Integration Broker -> Node Definitions

Create required nodes. Here we have 3 nodes 2 for inbound 1 for outbound.

Add a New Values

Creating MQ_INBOUND for inbound messages


Click on Connectors set Connector ID = PSFTTARGET


Click save then Click on Transactions Add Transaction and add the message your want to configure. Message should be active in app designer. Fill the required informanation.


It should show something like this after setup. External name which will be used in IB properties file.


Setup same thing for other Inbound MQ_IN_CONF put the correct message name.

Adding Outbound Node Name.


Click on Connectors select connector ID as JMSTARGET and fill the required filed. These values must match you what we defined in IVTSetup and WebSphere Setup.



Save it.

Check the status in Monitor Message by using Ping Node. Remember only Outbound Node can be pinged not inbound.

This completed WebServer setup in Peoplesoft.


Edit integrationbroker.properties file


Login to unix server as wsadmin user

Cd /opt/psoft/fs/pshomet/webserv/server_name/website.ear/PSIGW/WEB-INF

Cp integrationGateway.properties integrationGateway.properties.DDMM

Vi integrationGateway.properties


Find JMS Configuration Section and Make sure Correct connection factory is enabled.

#The JNDIFactory Classnames for Weblogic, IPlanet, MQSeries.
#ig.jms.JMSProvider.JNDIFactory.Weblogic=weblogic.jndi.WLInitialContextFactory
#ig.jms.JMSProvider.JNDIFactory.IPlanet=com.sun.jndi.fscontext.RefFSContextFactory
ig.jms.JMSProvider.JNDIFactory.MQSeries=com.sun.jndi.fscontext.RefFSContextFactory

Number of Queues to monitor

# Enter the number of Queue listners to instantiate
ig.jms.Queues=1 (number of any queues you want to monitor)

Configure following queues and messages.

ig.jms.Queue1=trinPS
ig.jms.Queue1.Provider=MQSeries
# ig.jms.Queue1.MessageSelector=
ig.jms.Queue1.JMSFactory=trQCF
ig.jms.Queue1.Url=file:/opt/mqm/java/peoplesoft/jndi

As we are getting the Message name and requestingNode from the Message. This is optional if your message does not have tag following will used as default.

ig.jms.Queue1.MessageName=NMR_TRADE_TRANS_INB1
ig.jms.Queue1.MessageVersion=VERSION_1
ig.jms.Queue1.RequestingNode=MQ_INBOUND

We changed this procedure as we wanted to get the message in one queue only. If you want two different queues.
ig.jms.Queue2=trinPSNTP
ig.jms.Queue2.Provider=MQSeries
# ig.jms.Queue2.MessageSelector=
ig.jms.Queue2.JMSFactory=trQCF
ig.jms.Queue2.Url=file:/opt/mqm/java/peoplesoft/jndi
ig.jms.Queue2.MessageName=NMR_BANK_CONF_INB1
ig.jms.Queue2.MessageVersion=VERSION_1
ig.jms.Queue2.RequestingNode=MQ_IN_CONF

For Production Make sure you update the both the AppServers.

Edit web.xml file

Cd /opt/psoft/fs/pshome/webserv/servername/website.ear/PSIGW/WEB-INF

Cp web.xml web.xml.bak
Vi web.xml

Add following lines

Just below
Psigw
Add --– (This is comment don’t put this in file)

JMSListeningConnectorAdministrator
com.peoplesoft.pt.integrationgateway.listeningconnector.JMSListeningConnectorAdministrator

Add –ends – (This is comment don’t put this in file)
In the same file more place
Just on top of ‘ServletMapping’
Add--– (This is comment don’t put this in file)

JMSListeningConnectorAdministrator
/JMSListeningConnectorAdministrator/*

Add end – (This is comment don’t put this in file)

Final Setup start JMS Listener


Start JMS Listener
Start
http://server_name:port/PSIGW/JMSListeningConnectorAdministrator?Activity=start
Stop

http://servername:8000/PSIGW/JMSListeningConnectorAdministrator?Activity=stop

If everything setup correctly you see messages coming into PeopleSoft, else send me email at skumar@us.nomura.com I will replay when I get time.


Common errors

Message stays in New.

Make sure domain status is active


Check if there is any error messages.

No comments: