Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-10439

Websphere MQ resource adapter is able to read messages from queues and topics when connection didn't start

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • EAP_EWP 5.3.0.ER1
    • EAP_EWP 5.2.0 ER2, EAP_EWP 5.2.0 ER5, EAP_EWP 5.2.0 ER6
    • Messaging, TCK
    • None
    • TCK5 run

    • Hide

      use connection factories from the remote MQ broker (through external context):

      <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
            name="jboss.jms:service=JMSProviderLoader,name=WSMQJmsWNPMQMProvider">
          <attribute name="ProviderName">WSMQJmsWNPMQMProvider</attribute> 
          <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
          <attribute name="FactoryRef">IBMMQIntialContext/XACF</attribute>
          <attribute name="QueueFactoryRef">IBMMQIntialContext/XAQCF</attribute>
          <attribute name="TopicFactoryRef">IBMMQIntialContext/XATCF</attribute>
          <depends>jboss.jndi:service=ExternalContext,jndiName=IBMMQIntialContext</depends>
        </mbean> 
      

      where external context is defined like this:

      <mbean code="org.jboss.naming.ExternalContext" name="jboss.jndi:service=ExternalContext,jndiName=IBMMQIntialContext">
      <attribute name="JndiName">IBMMQIntialContext</attribute>
      <attribute name="InitialContext">javax.naming.InitialContext</attribute>
      <attribute name="RemoteAccess">true</attribute>
      <attribute name="Properties">
      java.naming.factory.initial=com.ibm.mq.jms.context.WMQInitialContextFactory
      java.naming.factory.url.pkgs=com.ibm.mq.jms.naming
      java.naming.provider.url=dev120.mw.lab.eng.bos.redhat.com:1414/CH
      </attribute>
      </mbean>
      
      Show
      use connection factories from the remote MQ broker (through external context): <mbean code= "org.jboss.jms.jndi.JMSProviderLoader" name= "jboss.jms:service=JMSProviderLoader,name=WSMQJmsWNPMQMProvider" > <attribute name= "ProviderName" >WSMQJmsWNPMQMProvider</attribute> <attribute name= "ProviderAdapterClass" >org.jboss.jms.jndi.JNDIProviderAdapter</attribute> <attribute name= "FactoryRef" >IBMMQIntialContext/XACF</attribute> <attribute name= "QueueFactoryRef" >IBMMQIntialContext/XAQCF</attribute> <attribute name= "TopicFactoryRef" >IBMMQIntialContext/XATCF</attribute> <depends>jboss.jndi:service=ExternalContext,jndiName=IBMMQIntialContext</depends> </mbean> where external context is defined like this: <mbean code= "org.jboss.naming.ExternalContext" name= "jboss.jndi:service=ExternalContext,jndiName=IBMMQIntialContext" > <attribute name= "JndiName" >IBMMQIntialContext</attribute> <attribute name= "InitialContext" >javax.naming.InitialContext</attribute> <attribute name= "RemoteAccess" > true </attribute> <attribute name= "Properties" > java.naming.factory.initial=com.ibm.mq.jms.context.WMQInitialContextFactory java.naming.factory.url.pkgs=com.ibm.mq.jms.naming java.naming.provider.url=dev120.mw.lab.eng.bos.redhat.com:1414/CH </attribute> </mbean>
    • Issue in IBM Websphere MQ itself.
    • Not Required
    • NEW

    Description

      Websphere MQ resource adapter is able to read messages from queues and topics when connection didn't start.
      6 tests in TCK affected:
      3 for queue connection
      https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/EAP5/view/IBM-MQ/job/tck5-eap5x-jdk6-jms-ibmmq/18/testReport/unknownTestSuite.0/packageTests/com.sun.ts.tests.jms.ee.all.queueconn/
      3 for topic connection
      https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/EAP5/view/IBM-MQ/job/tck5-eap5x-jdk6-jms-ibmmq/18/testReport/unknownTestSuite.0/packageTests/com.sun.ts.tests.jms.ee.all.topicconntests/
      Impact for customers
      Incorrect behaviour of connections.
      Reproducer info
      failed test org.jboss.as.test.ibm.mq.tck.NonStartedConnectionTestCase in
      https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/EAP5/view/IBM-MQ/job/_eap5-ibm-mq-tck-failures-reproducers/
      Link to reproducers execution:
      https://docspace.corp.redhat.com/docs/DOC-124332#rep
      Links for info how to setup IBM MQ locally
      https://docspace.corp.redhat.com/docs/DOC-114804#qi
      More detailed description
      For example in DefaultQueue there is a message we need to receive. The code below gets message successfully, without calling Connection.start() method:

      QueueConnectionFactory cf = (QueueConnectionFactory) context.lookup(JndiName);
      QueueConnection newConn = cf.geQueueConnection( user, password);
      QueueSession   newSess = newConn.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
      Receiver   newRec = newSess.createReceiver(DefaultQueue);
      TextMessage  messageReceived = (TextMessage) newRec.receiveNoWait();
      

      Connection factories, used in test are created this way:

      <connection-factories>
        <tx-connection-factory>
          <jndi-name>jms/QCF</jndi-name>
          <xa-transaction />
          <rar-name>wmq.jmsra.rar</rar-name>
          <connection-definition>javax.jms.QueueConnectionFactory</connection-definition>
          <config-property name="channel" type="java.lang.String">CH</config-property>
          <config-property name="hostName" type="java.lang.String">dev120.mw.lab.eng.bos.redhat.com</config-property>
          <config-property name="port" type="java.lang.String">1414</config-property>
          <config-property name="queueManager" type="java.lang.String">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>
       
        <tx-connection-factory>
          <jndi-name>jms/TCF</jndi-name>
          <xa-transaction />
          <rar-name>wmq.jmsra.rar</rar-name>
          <connection-definition>javax.jms.TopicConnectionFactory</connection-definition>
          <config-property name="channel" type="java.lang.String">CH</config-property>
          <config-property name="hostName" type="java.lang.String">dev120.mw.lab.eng.bos.redhat.com</config-property>
          <config-property name="port" type="java.lang.String">1414</config-property>
          <config-property name="queueManager" type="java.lang.String">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>
      </connection-factories/>
      

      Error message:

      11-21-2012 12:43:39: SVR-TRACE: ABOUT TO INVOKE EETEST RUN METHOD!
      11-21-2012 12:43:39: SVR-TRACE: Getting initial context
      11-21-2012 12:43:39: SVR-TRACE: Getting QueueConnectionFactory
      11-21-2012 12:43:39: SVR-TRACE: Getting Queue
      11-21-2012 12:43:39: SVR-TRACE: Creating QueueConnection
      11-21-2012 12:43:39: SVR-TRACE: Creating QueueSession
      11-21-2012 12:43:39: SVR-TRACE: Creating receiver
      11-21-2012 12:43:39: SVR-TRACE: Creating sender
      11-21-2012 12:43:39: SVR-TRACE: Success - Queue Setup done
      11-21-2012 12:43:39: SVR: Creating TextMessage
      11-21-2012 12:43:39: SVR: Sending two TextMessages
      11-21-2012 12:43:40: SVR: Receiving second message only
      11-21-2012 12:43:40: SVR: Closing receiver, creating new connection without starting
      11-21-2012 12:43:41: SVR: receiving first message
      11-21-2012 12:43:41: SVR-ERROR: Fail: message received even though connection not started!
      11-21-2012 12:43:41: SVR-ERROR: Error: failures occurred during tests
      11-21-2012 12:43:41: SVR-ERROR: com.sun.ts.lib.harness.EETest$Fault: Error: failures occurred during tests
      at com.sun.ts.tests.jms.ee.all.queueconn.QueueConnTests.connNotStartedQueueTest(QueueConnTests.java:199)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.sun.ts.lib.harness.EETest.run(EETest.java:495)
      at com.sun.ts.lib.harness.ServiceEETest.run(ServiceEETest.java:112)
      at com.sun.ts.tests.common.vehicle.ejb.EJBVehicle.runTest(EJBVehicle.java:70)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.invocation.Invocation.performCall(Invocation.java:386)
      at org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulSessionContainer.java:620)
      at org.jboss.ejb.plugins.StatefulSessionSecurityInterceptor.invoke(StatefulSessionSecurityInterceptor.java:84)
      at org.jboss.ejb.plugins.SecurityInterceptor.process(SecurityInterceptor.java:233)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:211)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:156)
      at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
      at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:173)
      at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:77)
      at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:348)
      at org.jboss.ejb.plugins.security.PreSecurityInterceptor.process(PreSecurityInterceptor.java:100)
      at org.jboss.ejb.plugins.security.PreSecurityInterceptor.invoke(PreSecurityInterceptor.java:84)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
      at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:650)
      at org.jboss.ejb.Container.invoke(Container.java:1092)
      at sun.reflect.GeneratedMethodAccessor492.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
      at org.jboss.invocation.unified.server.UnifiedInvoker.invoke(UnifiedInvoker.java:232)
      at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:967)
      at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:791)
      at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:744)
      at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:586)
      at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:234)

      Attachments

        Issue Links

          Activity

            People

              rhn-engineering-cdewolf Carlo de Wolf
              vrastsel_jira Vladimir Rastseluev (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: