Saturday, January 5, 2013

Configure IBM MQ 7 - JMS with JBOSS


Configure IBM MQ JMS with JBOSS


http://rocksolutions.wordpress.com/2012/02/04/using-websphere-mq-with-jboss-as-5/

Step 1: Install JBoss 5
Step 2: Install Websphere MQ 7
Step3: Install wmq.jmsra.rar

Step 4: Create wmq.jmsra-ds.xml

<?xml version=”1.0? encoding=”UTF-8??>
<connection-factories>
<tx-connection-factory>
<jndi-name>IVTCF</jndi-name>
<xa-transaction />
<rar-name>wmq.jmsra.rar</rar-name>
<connection-definition>javax.jms.ConnectionFactory</connection-definition>
<config-property name=”channel” type=”java.lang.String”>SYSTEM.DEF.SVRCONN</config-property>
<config-property name=”hostName” type=”java.lang.String”>127.0.0.1</config-property>
<config-property name=”port” type=”java.lang.String”>1417</config-property>
<config-property name=”queueManager” type=”java.lang.String”>JBOSS_QM</config-property>
<config-property name=”transportType” type=”java.lang.String”>CLIENT</config-property>
<security-domain-and-application>JmsXARealm</security-domain-and-application>
</tx-connection-factory>
<mbean code=”org.jboss.resource.deployment.AdminObject” name=”jca.wmq:name=ivtqueue”>
<!– Bind this AdminObject with the JNDI name IVTQueue –>
<attribute name=”JNDIName”>IVTQueue</attribute>
<depends optional-attribute-name=”RARName”>jboss.jca:service=RARDeployment,name=’wmq.jmsra.rar’</depends>
<attribute name=”Type”>javax.jms.Queue</attribute>
<attribute name=”Properties”>
baseQueueManagerName=JBOSS_QM
baseQueueName=JBOSS_Q
</attribute>
</mbean>
</connection-factories>

Step 5:  Create a EJB 3.0 project in JBoss Studio or in Eclipse IDE.

Step 6: Write a Message Driven Bean

Step 7:  Now Build the project.Start the server, If all the configuration are correct then you will see binding information of the JNDI name in the server logs, This is the first indication that Link between MQ and JBoss has successfully created.

References:

Code Example:


Below link gives you an example of how to configure web sphere MQ with JBOSS


Code Example


No comments:

Post a Comment