4 Replies Latest reply on Nov 15, 2016 4:53 PM by kmansoor

    IBM MQ resource Adapter - Inbound Communication Configuration [with Spring]

    vandamo

      During the migration of an application to the JBoss platform, we have encountered some errors (actually warnings) for which we haven’t properly identified the root cause:

       

       

      WARN  [org.springframework.jms.listener.DefaultMessageListenerContainer] (org.springframework.jms.listener.DefaultMessageListenerContainer#0-28) Setup of JMS message listener invoker failed for destination 'jms/workflowInputQueue' - trying to recover. Cause: MQJCA1018: Only one session per connection is allowed.

       

      After some research, I think the root cause is what I underlined in the configuration below

      and is referenced here http://www-01.ibm.com/support/docview.wss?uid=swg21665128

      and here http://www-01.ibm.com/support/knowledgecenter/SSFKSJ_7.5.0/com.ibm.mq.dev.doc/q031670_.htm?lang=en

       

      Key Entry [first link]
      “For Inbound Communications, the JMS Connection Pools and JMS Session Pools are implemented by the WebSphere MQ JCA resource adapter.”

       

      And the conclusion can be summarized by:

      spring jms listener = asynchronous, means inbound -> Activation Spec configuration -> ???

       

      So the current setup is (I think) configuring a connection definition as if it was for outbound, while it should define an Activation Definition?

      I'd like to find an in-depth documentation reference so I can validate/correct my view, and if possible, have a better understanding of what I can configure in JBoss, what I'll need to configure "outside" JBoss, and how to retrieve the information in Spring.

       

      JBoss Version
      6.2.1.GA - Domain Mode

       

      Configuration for this destination:

       

      /profile=myapp/subsystem=resource-adapters/resource-adapter=wmq.jmsra.rar/connection-definitions=myappListenerQCF:read-resource(include-defaults=true,recursive=true)

      {

          "outcome" => "success",

          "result" => {

              "allocation-retry" => undefined,

              "allocation-retry-wait-millis" => undefined,

              "background-validation" => false,

              "background-validation-millis" => undefined,

              "blocking-timeout-wait-millis" => undefined,

              "class-name" => "com.ibm.mq.connector.outbound.ManagedConnectionFactoryImpl",

              "enabled" => true,

              "flush-strategy" => "FailingConnectionOnly",

              "idle-timeout-minutes" => undefined,

              "interleaving" => false,

              "jndi-name" => "java:/jms/myappListenerQCF",

              "max-pool-size" => "100",

              "min-pool-size" => "100",

              "no-recovery" => false,

              "no-tx-separate-pool" => false,

              "pad-xid" => false,

              "pool-prefill" => "true",

              "pool-use-strict-min" => "true",

              "recovery-password" => undefined,

              "recovery-plugin-class-name" => undefined,

              "recovery-plugin-properties" => undefined,

              "recovery-security-domain" => "wsmq_security",

              "recovery-username" => undefined,

              "same-rm-override" => undefined,

              "security-application" => false,

              "security-domain" => "wsmq_security",

              "security-domain-and-application" => undefined,

              "use-ccm" => true,

              "use-fast-fail" => false,

              "use-java-context" => true,

              "use-try-lock" => undefined,

              "wrap-xa-resource" => true,

              "xa-resource-timeout" => undefined,

              "config-properties" => {

                  "hostName" => {"value" => "mqserverhostname"},

                  "port" => {"value" => "1520"},

                  "channel" => {"value" => "channelname"},

                  "transportType" => {"value" => "CLIENT"},

                  "queueManager" => {"value" => "qmname"}

              }

          }

      }

      /profile=myapp/subsystem=resource-adapters/resource-adapter=wmq.jmsra.rar/admin-objects=workflowInputQueue:read-resource(include-defaults=true,recursive=true)

      {

          "outcome" => "success",

          "result" => {

              "class-name" => "com.ibm.mq.connector.outbound.MQQueueProxy",

              "enabled" => true,

              "jndi-name" => "java:/jms/workflowInputQueue",

              "use-java-context" => true,

              "config-properties" => {"baseQueueName" => {"value" => "QUEUE.IN"}}

          }

      }

        • 1. Re: IBM MQ resource Adapter - Inbound Communication Configuration [with Spring]
          vandamo

          Additional question, is/will there be any way to define an activation spec configuration in JBoss?

          This would allow for configuration to be defined outside the applications, and in the case of the Websphere MQ resource adapter, to have same access point for creating/maintaining the configuration, whether for outbound or inbound.

          • 2. Re: Re: IBM MQ resource Adapter - Inbound Communication Configuration [with Spring]
            mnovak

            From:

            Cause: MQJCA1018: Only one session per connection is allowed.
            

            I'd say that something is creating more than 1 Session on Connection. This is limitation for JMS in Java EE. Connection can have only one Session.

             

            Thanks,

            Mirek

            • 3. Re: IBM MQ resource Adapter - Inbound Communication Configuration [with Spring]
              vandamo

              Hi Miroslav.

               

              Thanks for the input, indeed that is what happening, but as I tried to describe, this is typically not something you'd expect to have to manage in this context.

               

              So based on my research I came to the conclusion that the factory defined in JBoss is not behaving correctly because it is designed for output (publishing on a queue), not input (consuming a message).

               

              The information I have found and my current level of understanding have not been sufficient to resolve the issue, which is why I'm asking for help.

               

              What I'm looking for is examples of defining an activation spec, ideally in JBoss itself so as to limit to a minimum any specific configuration that would be packaged with the application.

               

              So examples of ActivationSpec definition (in JBoss or Spring) in relation to usage of listener-container (or jca-listener-container?) and how to reference the elements defined in JBoss is what I'd find most helpful at this stage.

               

              And of course if my understanding of the situation is incorrect, to let me know so I can hopefully continue searching, but this time in the right direction.

               

              Regards,

              Olivier

              • 4. Re: IBM MQ resource Adapter - Inbound Communication Configuration [with Spring]
                kmansoor

                Hello Oliver- Did you ever find resolution to this issue? I'm facing the same and there is not much to go on on the web.

                 

                Thank you.