2

I'm looking for some help.

Context:

  • Application configuration,
  • JBoss EAP 6.2,
  • WebSphere MQ 7.5 Resource Adapter,
  • Spring

Current Status:

Application manages to send messages just fine, but unless we "boost" the number of connections related to message consumption, we have a warning message popping up in the logs:

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.

Research result:

After some research, I identified the root cause from the following 2 links, and is referenced here Removal of internal Connection Pooling for WebSphere MQ Classes and here IBM MQ - Configuring the resource adapter for inbound communication

The root cause of the issue can be summarized by this quote:

For Inbound Communications, the JMS Connection Pools and JMS Session Pools are implemented by the WebSphere MQ JCA resource adapter.

What I'm looking for: I don't have prior Spring knowledge, my tasks usually were focused on Linux/Unix Administration, Application Server setup and configuration.

I'd like:

  • A sample configuration for a jms listener (MDP), with some indication of what can be configured in JBoss, and what cannot and should be configured in spring or other xml configuration (Activation Spec being an example
  • Additional sources I can read to better understand the spring configuration
  • Some explanation on how to reference the resource adapter in the Spring configuration, while the wmq.jmsra.rar resource adapter has been uploaded in the JBoss Content Repository, and assigned to the same server group as the application.

The ideal form of the solution:

  • A sample Spring configuration (xml based), with Resource adapter, ActivationSpec, MessageEndpointListener or (jca-?)listener-container, that would provide a good overview of the configuration necessary
  • Possibly explanations on how to define all this configuration in JBos, and make reference to it in spring through jndi lookup.

I already asked this question through the JBoss Community forum but haven't received much feedback

Current problematic configuration:

/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"}}
    }
}

Also worth noting that there is another post on Stack Overflow entitled "Spring JMS and WebSphere MQ", which covers at least partly the subject, but not at all the jboss aspect. I'd favor being able to push most of the configuration at jboss level and just look it up in Spring if possible.

Thanks in advance for all the input the community could provide

Olivier
  • 2,571
  • 1
  • 17
  • 25
  • Just did a test, and configuration proposed [here](http://stackoverflow.com/questions/14523572/spring-jms-and-websphere-mq) seems to work (only checked the logs for now, didn't do a test with some load). Still, I don't consider it ideal as to manage all the parameters would require either many entries in a properties file loaded as module for Spring to perform the replacement, or system properties for JBoss to do the same. Will be looking into jca subsytem, to see if there would be a way to define the activationspec through there and simply refer to it – Olivier Aug 08 '14 at 14:27

0 Answers0