6 Replies Latest reply on Mar 29, 2011 9:02 AM by Rod Biresch

    WebSphere MQ issue

    Rod Biresch Newbie

      Hi,

      I'm running a web app in JBoss AS 5.1.0 with WebSphere MQ 7 configured as a JCA resource.  The application works well pushing/popping messages on and off the queues.  Recently during some load testing we've noticed two things that has us concerned.  The first is that the "open input count" on the MQ queues continues to grow and so do the number of TCP connections to WSMQ.

       

      I did some research and found that the MQ Queue Open Input Count "shows the number of open input handles, that is the total handles open for input on this queue. This gives you an idea on the number of applications that are currently connected to the queue to put messages on the queue".  In our test, the count rose to 125 in 20 hours of load testing.  The number of connections to WSMQ rose to 27 (according to netstat).

       

      There is concern that over time these counts and connections will continue to grow.  Should there be a concern here?  Is there some configuration that can control this behavior?

       

      BTW...the production system is running on a different application server and queue open input count remains low 1 or 2.

        • 1. WebSphere MQ issue
          Jesper Pedersen Master

          Two options:

           

          1. Look through the TRACE logging for the JCA container
          2. See if the problem is the same on JBoss Application Server 7.0.0.Alpha

           

          The 3rd option is of course to open a support ticket on the issue.

          • 2. WebSphere MQ issue
            Rod Biresch Newbie

            TRACE logging didn't reveal much.  I did notice that there is a newer "wmq.jmsra.rar" file than the one deployed in JBoss 5.1.0.  The "wmq.jmsra.rar" file is 3 months newer 8/13/2009 from WSMQ 7.

             

            We are going to rerun the load test and I'll report back.

            • 3. WebSphere MQ issue
              Rod Biresch Newbie

              Ok, well I believe the problem has been resolved.  Apparently, using the "wmq.jmsra.rar" that came in the WSMQ 7 installed has corrected the problem with queue "open input count" and number of connections.  We ran another overnight test and the queue "open input count" never exceeded 6 with 4-6 connections to WSMQ.

              • 4. WebSphere MQ issue
                Jesper Pedersen Master

                Good. Feel free to try with the IronJacamar 1.0.0.Beta4 release too.

                • 5. WebSphere MQ issue
                  Igor Beslic Newbie

                  Hi Rod! Ihave similar configuration: jboss 5.1.0, wmq.jmsra.rar 7 and WSMQ 7. I configured one connection factory in wmq.jmsra-ds.xml. I use it to send messages to ws mq queue (it works perfectly). Recently I tried to receive messages within my MDBs. It requires configuring inbound messaging and I stacked with samples based on jboss 5.0 and ws mq 6 which are not apropriate for jboss 5.1.0 and ws mq 7.

                  Please can you describe me way you receive messages from mq - and if you do it in inbound manner can you post samples of your descriptors?

                  Thank you very much!

                  • 6. WebSphere MQ issue
                    Rod Biresch Newbie

                    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.

                     

                    =======

                    jboss.xml (bundled in your app)

                    =======

                     

                    <?xml version="1.0"?>

                    <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.2//EN" "http://www.jboss.org/j2ee/dtd/jboss_4_2.dtd">

                    <jboss>

                      <enterprise-beans>

                                        <session>

                                                  <ejb-name>RemoteSystem</ejb-name>

                                                  <resource-ref>

                                                            <res-ref-name>jdbc/DataSource</res-ref-name>

                                                            <jndi-name>java:/DataSource</jndi-name>

                                                  </resource-ref>

                                                  <resource-ref>

                                                            <res-ref-name>jms/WSMQCF</res-ref-name>

                                                            <jndi-name>java:/WSMQCF</jndi-name>

                                                  </resource-ref>

                                                  <message-destination-ref>

                                                            <message-destination-ref-name>jms/Queue</message-destination-ref-name>

                                                            <jndi-name>java:/RemoteSystemQueue</jndi-name>

                                                  </message-destination-ref>

                                        </session>

                    <!-- more bean configuration here-->

                        <message-driven>

                          <ejb-name>MessageProcessor</ejb-name>

                          <activation-config>

                            <activation-config-property>

                              <activation-config-property-name>destinationType</activation-config-property-name>

                              <activation-config-property-value>javax.jms.Queue</activation-config-property-value>

                            </activation-config-property>

                            <activation-config-property>

                              <activation-config-property-name>useJNDI</activation-config-property-name>

                              <activation-config-property-value>false</activation-config-property-value>

                            </activation-config-property>

                            <activation-config-property>

                              <activation-config-property-name>destination</activation-config-property-name>

                              <activation-config-property-value>${mq.incoming.queue}</activation-config-property-value>

                            </activation-config-property>

                            <activation-config-property>

                              <activation-config-property-name>channel</activation-config-property-name>

                              <activation-config-property-value>${mq.channel}</activation-config-property-value>

                            </activation-config-property>

                            <activation-config-property>

                              <activation-config-property-name>hostName</activation-config-property-name>

                              <activation-config-property-value>${mq.hostname}</activation-config-property-value>

                            </activation-config-property>

                            <activation-config-property>

                              <activation-config-property-name>port</activation-config-property-name>

                              <activation-config-property-value>${mq.port}</activation-config-property-value>

                            </activation-config-property>

                            <activation-config-property>

                              <activation-config-property-name>queueManager</activation-config-property-name>

                              <activation-config-property-value>${mq.mgrname}</activation-config-property-value>

                            </activation-config-property>

                            <activation-config-property>

                              <activation-config-property-name>transportType</activation-config-property-name>

                              <activation-config-property-value>CLIENT</activation-config-property-value>

                            </activation-config-property>

                          </activation-config>

                          <resource-adapter-name>wmq.jmsra.rar</resource-adapter-name>

                          <configuration-name>Standard Message Inflow Driven Bean</configuration-name>

                          <!-- use the a JMS invoker bindings for message inflow driven beans -->

                          <invoker-bindings>

                            <invoker>

                              <invoker-proxy-binding-name>message-inflow-driven-bean</invoker-proxy-binding-name>

                            </invoker>

                          </invoker-bindings>

                          <resource-ref>

                            <res-ref-name>jms/WSMQCF</res-ref-name>

                            <jndi-name>java:/WSMQCF</jndi-name>

                          </resource-ref>

                          <message-destination-ref>

                            <message-destination-ref-name>jms/ExceptionQueue</message-destination-ref-name>

                            <jndi-name>java:/ExceptionQueue</jndi-name>

                          </message-destination-ref>

                        </message-driven>

                      </enterprise-beans>

                    </jboss>

                     

                    =======

                    wmq.jmsra-ds.xml

                    =======

                     

                     

                    <?xml version="1.0" encoding="UTF-8"?>

                     

                     

                    <connection-factories>

                     

                      <!-- ==================================================================== -->

                      <!-- WebSphere MQ JMS/JCA Configuration                                                                               -->

                      <!-- ==================================================================== -->

                     

                      <mbean code="org.jboss.resource.deployment.AdminObject"

                          name="jca.wmq:name=sendtoqueue">

                     

                     

                        <!-- Bind this AdminObject  with the JNDI name ToRemoteSystemQueue -->

                        <attribute name="JNDIName">java:ToRemoteSystemQueue</attribute>

                     

                     

                        <!-- this MBean depends on the WebSphere MQ resource adapter -->

                        <depends optional-attribute-name="RARName">

                          jboss.jca:service=RARDeployment,name='wmq.jmsra.rar'

                        </depends>

                     

                     

                        <!-- this admin object is a javax.jms.Queue -->

                        <attribute name="Type">javax.jms.Queue</attribute>

                     

                     

                        <attribute name="Properties">

                          baseQueueManagerName=QM

                          baseQueueName=SEND.TO.QUEUE

                        </attribute>

                      </mbean>

                     

                      <mbean code="org.jboss.resource.deployment.AdminObject"

                          name="jca.wmq:name=exceptionqueue">

                     

                     

                        <!-- Bind this AdminObject  with the JNDI name ExceptionQueue -->

                        <attribute name="JNDIName">java:ExceptionQueue</attribute>

                     

                     

                        <!-- this MBean depends on the WebSphere MQ resource adapter -->

                        <depends optional-attribute-name="RARName">

                          jboss.jca:service=RARDeployment,name='wmq.jmsra.rar'

                        </depends>

                     

                     

                        <!-- this admin object is a javax.jms.Queue -->

                        <attribute name="Type">javax.jms.Queue</attribute>

                     

                     

                          <attribute name="Properties">

                          baseQueueManagerName=QM

                          baseQueueName=EXCEPTION

                        </attribute>

                      </mbean>

                     

                      <!-- JMS XA Resource adapter, use this to get transacted JMS in beans -->

                      <tx-connection-factory>

                           <!-- Bind this ConnectionFactory with the JNDI name WSMQCF -->

                        <jndi-name>WSMQCF</jndi-name>

                     

                     

                        <!-- Indicate that the connection factory supports XA transactions -->

                        <xa-transaction />

                     

                     

                        <!-- rar-name is the actual RAR file name, in this case wmq.jmsra.rar -->

                        <rar-name>wmq.jmsra.rar</rar-name>

                     

                     

                        <!-- connection-definition is the ConnectionFactory interface

                          defined in the ra.xml -->

                        <connection-definition>javax.jms.ConnectionFactory</connection-definition>

                     

                     

                        <!--

                            Configuration for the ConnectionFactory. This defines the channel, hostname, port,

                            queueManager, and transportType properties for a client (TCP/IP) connection to WMQ

                        -->

                        <config-property name="channel" type="java.lang.String">JAVA.CHANNEL</config-property>

                        <config-property name="hostName" type="java.lang.String">hostname</config-property>

                        <config-property name="port" type="java.lang.String">1415</config-property>

                        <config-property name="queueManager" type="java.lang.String">QM</config-property>

                        <config-property name="transportType" type="java.lang.String">CLIENT</config-property>

                       

                        <max-pool-size>20</max-pool-size>

                     

                     

                        <!-- define security domain -->

                        <security-domain-and-application>JmsXARealm</security-domain-and-application>

                     

                     

                      </tx-connection-factory>

                     

                     

                    </connection-factories>

                    =======

                     

                    Here are a couple of resources that will help with configuration:

                     

                    http://www.ibm.com/developerworks/websphere/library/techarticles/0710_ritchie/0710_ritchie.html

                    http://community.jboss.org/wiki/UsingWebSphereMQSeriesWithJBossASPart4

                    http://www-01.ibm.com/support/docview.wss?uid=pub1sc34692800

                     

                    Cheers!