<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Re: WebSphere MQ issue
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/rbiresch">Rod Biresch</a> in <i>IronJacamar</i> - <a href="http://community.jboss.org/message/596223#596223">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p> Below is the configuration that my app is using.  There's more information there than you need.  I had to "clean" it somewhat before posting so hopefully I didn't make any mistakes.  I use token replacement {$...} with JVM properties in the jboss.xml so that I don't have to hard code WSMQ configuration when deploying to different environments.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>=======</p><p>jboss.xml (bundled in your app)</p><p>=======</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><?xml version="1.0"?></p><p><span><!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.2//EN" "</span><a class="jive-link-external-small" href="http://www.jboss.org/j2ee/dtd/jboss_4_2.dtd" target="_blank">http://www.jboss.org/j2ee/dtd/jboss_4_2.dtd</a><span>"></span></p><p><jboss></p><p>  <enterprise-beans></p><p>                    <session></p><p>                              <ejb-name>RemoteSystem</ejb-name></p><p>                              <resource-ref></p><p>                                        <res-ref-name>jdbc/DataSource</res-ref-name></p><p>                                        <jndi-name>java:/DataSource</jndi-name></p><p>                              </resource-ref></p><p>                              <resource-ref></p><p>                                        <res-ref-name>jms/WSMQCF</res-ref-name></p><p>                                        <jndi-name>java:/WSMQCF</jndi-name></p><p>                              </resource-ref></p><p>                              <message-destination-ref></p><p>                                        <message-destination-ref-name>jms/Queue</message-destination-ref-name></p><p>                                        <jndi-name>java:/RemoteSystemQueue</jndi-name></p><p>                              </message-destination-ref></p><p>                    </session></p><p><!-- more bean configuration here--></p><p>    <message-driven></p><p>      <ejb-name>MessageProcessor</ejb-name></p><p>      <activation-config></p><p>        <activation-config-property></p><p>          <activation-config-property-name>destinationType</activation-config-property-name></p><p>          <activation-config-property-value>javax.jms.Queue</activation-config-property-value></p><p>        </activation-config-property></p><p>        <activation-config-property></p><p>          <activation-config-property-name>useJNDI</activation-config-property-name></p><p>          <activation-config-property-value>false</activation-config-property-value></p><p>        </activation-config-property></p><p>        <activation-config-property></p><p>          <activation-config-property-name>destination</activation-config-property-name></p><p>          <activation-config-property-value>${mq.incoming.queue}</activation-config-property-value></p><p>        </activation-config-property></p><p>        <activation-config-property></p><p>          <activation-config-property-name>channel</activation-config-property-name></p><p>          <activation-config-property-value>${mq.channel}</activation-config-property-value></p><p>        </activation-config-property></p><p>        <activation-config-property></p><p>          <activation-config-property-name>hostName</activation-config-property-name></p><p>          <activation-config-property-value>${mq.hostname}</activation-config-property-value></p><p>        </activation-config-property></p><p>        <activation-config-property></p><p>          <activation-config-property-name>port</activation-config-property-name></p><p>          <activation-config-property-value>${mq.port}</activation-config-property-value></p><p>        </activation-config-property></p><p>        <activation-config-property></p><p>          <activation-config-property-name>queueManager</activation-config-property-name></p><p>          <activation-config-property-value>${mq.mgrname}</activation-config-property-value></p><p>        </activation-config-property></p><p>        <activation-config-property></p><p>          <activation-config-property-name>transportType</activation-config-property-name></p><p>          <activation-config-property-value>CLIENT</activation-config-property-value></p><p>        </activation-config-property></p><p>      </activation-config></p><p>      <resource-adapter-name>wmq.jmsra.rar</resource-adapter-name></p><p>      <configuration-name>Standard Message Inflow Driven Bean</configuration-name></p><p>      <!-- use the a JMS invoker bindings for message inflow driven beans --></p><p>      <invoker-bindings></p><p>        <invoker></p><p>          <invoker-proxy-binding-name>message-inflow-driven-bean</invoker-proxy-binding-name></p><p>        </invoker></p><p>      </invoker-bindings></p><p>      <resource-ref></p><p>        <res-ref-name>jms/WSMQCF</res-ref-name></p><p>        <jndi-name>java:/WSMQCF</jndi-name></p><p>      </resource-ref></p><p>      <message-destination-ref></p><p>        <message-destination-ref-name>jms/ExceptionQueue</message-destination-ref-name></p><p>        <jndi-name>java:/ExceptionQueue</jndi-name></p><p>      </message-destination-ref></p><p>    </message-driven></p><p>  </enterprise-beans></p><p></jboss></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>=======</p><p>wmq.jmsra-ds.xml</p><p>=======</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><?xml version="1.0" encoding="UTF-8"?></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><connection-factories></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>  <!-- ==================================================================== --></p><p>  <!-- WebSphere MQ JMS/JCA Configuration                                                                               --></p><p>  <!-- ==================================================================== --></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>  <mbean code="org.jboss.resource.deployment.AdminObject"</p><p>      name="jca.wmq:name=sendtoqueue"></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    <!-- Bind this AdminObject  with the JNDI name ToRemoteSystemQueue --></p><p>    <attribute name="JNDIName">java:ToRemoteSystemQueue</attribute></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    <!-- this MBean depends on the WebSphere MQ resource adapter --></p><p>    <depends optional-attribute-name="RARName"></p><p>      jboss.jca:service=RARDeployment,name='wmq.jmsra.rar'</p><p>    </depends></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    <!-- this admin object is a javax.jms.Queue --></p><p>    <attribute name="Type">javax.jms.Queue</attribute></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    <attribute name="Properties"></p><p>      baseQueueManagerName=QM</p><p>      baseQueueName=SEND.TO.QUEUE</p><p>    </attribute></p><p>  </mbean></p><p>  </p><p>  <mbean code="org.jboss.resource.deployment.AdminObject"</p><p>      name="jca.wmq:name=exceptionqueue"></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    <!-- Bind this AdminObject  with the JNDI name ExceptionQueue --></p><p>    <attribute name="JNDIName">java:ExceptionQueue</attribute></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    <!-- this MBean depends on the WebSphere MQ resource adapter --></p><p>    <depends optional-attribute-name="RARName"></p><p>      jboss.jca:service=RARDeployment,name='wmq.jmsra.rar'</p><p>    </depends></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    <!-- this admin object is a javax.jms.Queue --></p><p>    <attribute name="Type">javax.jms.Queue</attribute></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>      <attribute name="Properties"></p><p>      baseQueueManagerName=QM</p><p>      baseQueueName=EXCEPTION</p><p>    </attribute></p><p>  </mbean></p><p>  </p><p>  <!-- JMS XA Resource adapter, use this to get transacted JMS in beans --></p><p>  <tx-connection-factory></p><p>       <!-- Bind this ConnectionFactory with the JNDI name WSMQCF --></p><p>    <jndi-name>WSMQCF</jndi-name></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    <!-- Indicate that the connection factory supports XA transactions --></p><p>    <xa-transaction /></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    <!-- rar-name is the actual RAR file name, in this case wmq.jmsra.rar --></p><p>    <rar-name>wmq.jmsra.rar</rar-name></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    <!-- connection-definition is the ConnectionFactory interface </p><p>      defined in the ra.xml --></p><p>    <connection-definition>javax.jms.ConnectionFactory</connection-definition></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    <!--</p><p>        Configuration for the ConnectionFactory. This defines the channel, hostname, port,</p><p>        queueManager, and transportType properties for a client (TCP/IP) connection to WMQ</p><p>    --></p><p>    <config-property name="channel" type="java.lang.String">JAVA.CHANNEL</config-property></p><p>    <config-property name="hostName" type="java.lang.String">hostname</config-property></p><p>    <config-property name="port" type="java.lang.String">1415</config-property></p><p>    <config-property name="queueManager" type="java.lang.String">QM</config-property></p><p>    <config-property name="transportType" type="java.lang.String">CLIENT</config-property></p><p>    </p><p>    <max-pool-size>20</max-pool-size></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    <!-- define security domain --></p><p>    <security-domain-and-application>JmsXARealm</security-domain-and-application></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>  </tx-connection-factory></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p></connection-factories></p><p>=======</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Here are a couple of resources that will help with configuration:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><a class="jive-link-external-small" href="http://www.ibm.com/developerworks/websphere/library/techarticles/0710_ritchie/0710_ritchie.html">http://www.ibm.com/developerworks/websphere/library/techarticles/0710_ritchie/0710_ritchie.html</a></p><p><a class="" href="http://community.jboss.org/docs/DOC-12535">http://community.jboss.org/wiki/UsingWebSphereMQSeriesWithJBossASPart4</a></p><p><a class="jive-link-external-small" href="http://www-01.ibm.com/support/docview.wss?uid=pub1sc34692800">http://www-01.ibm.com/support/docview.wss?uid=pub1sc34692800</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Cheers!</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/596223#596223">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in IronJacamar at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2098">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>