I. IBM MQ 6 and NK 3.2 Setup (one approach)
Add IBM MQ JARs in [Install]/lib/ext:
CL3Export.jar
com.ibm.mq.jms.Nojndi.jar
jndi.jar
providerutil.jar
CL3Nonexport.jar
com.ibm.mq.soap.jar
dhbcore.jar
jta.jar
com.ibm.mq.jar
commonservices.jar
fscontext.jar ldap.jar
com.ibm.mqjms.jar
connector.jar
jms.jar
postcard.jar
rmm.jar
Add .so libraries to [install]/lib/native
libmqjbdf02.so
libmqjbnd05.so
libmqjexitstub01.so
libMQXAi02.so
libPgmIpLayer.so
Add .so libraries to classpath in startup.sh
PROPS="$PROPS -Djava.library.path=/opt/esb/netkernel/lib/native"
For development environment (IDE) add jms.jar to your classpath
II. Extend JMS Transport
If all incoming messages have a JMS header, then you only need to remove the
geronimo-spec-j2ee-1.4-SNAPSHOT-short.jar from tpt-jms-1.0.2.jar - /lib.
Otherwise you also need to customize the JMS Transport to account for
incoming messages that might not have the JMS Header fields populated.
We are taking the approach of having a default queue (used if JMS
destination is not available). This default queue must be defined
in the hosting fulcrum (/etc/JMSConfig.xml). You are also going to need
to update the JMS Transport so that the HashSet mNeedAck class variable only
contains the logical queue or topic name.
Of course, the responsibility is on the non-jms application to send to
THAT default queue. In this way, you can still define any number of
queues for applications that do send messages with the
JMS Header (in hosting fulcrum /etc/JMSConfig.xml).
see code example at the end of this posting.
BTW, if your message passes a verb and relative URI
(update:/medical/account/1) using properties, theoretically, you only
need one inbound queue. See, RESTFUL JMS: http://www.1060.org/forum/topic/283/1
III. Populating Queue or Topic From Outside Application
A non-JMS application, for example a C or PL1 program, must
programmatically add the MQRFH2 on the message before putting it onto a
queue. In addition, within the queue bindings, you must specify
"targclient(jms)". Then when the queue is access via JMS API, for example
from NetKernel, IBM MQ maps those the MQRFH2 header fields to JMS Header
fields:
http://middleware.its.state.nc.us/middleware/Documentation/en_US/htm/csqzaw0
9/csqzaw0937.htm#TBLMESPFT
IBM will return an implementation of javax.jms.message
(com.ibm.jms.JMSMessage).
C program that adds the MQRFH2 (no PL1 equivalent found):
http://www-304.ibm.com/jct09002c/isv/tech/sample_code/mq/jsmqput.c
Add IBM MQ JARs in [Install]/lib/ext:
CL3Export.jar
com.ibm.mq.jms.Nojndi.jar
jndi.jar
providerutil.jar
CL3Nonexport.jar
com.ibm.mq.soap.jar
dhbcore.jar
jta.jar
com.ibm.mq.jar
commonservices.jar
fscontext.jar ldap.jar
com.ibm.mqjms.jar
connector.jar
jms.jar
postcard.jar
rmm.jar
Add .so libraries to [install]/lib/native
libmqjbdf02.so
libmqjbnd05.so
libmqjexitstub01.so
libMQXAi02.so
libPgmIpLayer.so
Add .so libraries to classpath in startup.sh
PROPS="$PROPS -Djava.library.path=/opt/esb/netkernel/lib/native"
For development environment (IDE) add jms.jar to your classpath
II. Extend JMS Transport
If all incoming messages have a JMS header, then you only need to remove the
geronimo-spec-j2ee-1.4-SNAPSHOT-short.jar from tpt-jms-1.0.2.jar - /lib.
Otherwise you also need to customize the JMS Transport to account for
incoming messages that might not have the JMS Header fields populated.
We are taking the approach of having a default queue (used if JMS
destination is not available). This default queue must be defined
in the hosting fulcrum (/etc/JMSConfig.xml). You are also going to need
to update the JMS Transport so that the HashSet mNeedAck class variable only
contains the logical queue or topic name.
Of course, the responsibility is on the non-jms application to send to
THAT default queue. In this way, you can still define any number of
queues for applications that do send messages with the
JMS Header (in hosting fulcrum /etc/JMSConfig.xml).
see code example at the end of this posting.
BTW, if your message passes a verb and relative URI
(update:/medical/account/1) using properties, theoretically, you only
need one inbound queue. See, RESTFUL JMS: http://www.1060.org/forum/topic/283/1
III. Populating Queue or Topic From Outside Application
A non-JMS application, for example a C or PL1 program, must
programmatically add the MQRFH2 on the message before putting it onto a
queue. In addition, within the queue bindings, you must specify
"targclient(jms)". Then when the queue is access via JMS API, for example
from NetKernel, IBM MQ maps those the MQRFH2 header fields to JMS Header
fields:
http://middleware.its.state.nc.us/middleware/Documentation/en_US/htm/csqzaw0
9/csqzaw0937.htm#TBLMESPFT
IBM will return an implementation of javax.jms.message
(com.ibm.jms.JMSMessage).
C program that adds the MQRFH2 (no PL1 equivalent found):
http://www-304.ibm.com/jct09002c/isv/tech/sample_code/mq/jsmqput.c
|