[ 
https://issues.apache.org/jira/browse/CXF-7094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15588789#comment-15588789
 ] 

Rainer Müller commented on CXF-7094:
------------------------------------

In MessageListenerContainer the code is weird.

A new session is created using the given connection, the destination to create 
the consumer was created outside with another session in JMSConduit by calling 
jmsConfig.getReplyDestination(session)

{code:java}
            session = connection.createSession(transacted, acknowledgeMode);
            if (durableSubscriptionName != null && destination instanceof 
Topic) {
                consumer = session.createDurableSubscriber((Topic)destination, 
durableSubscriptionName,
                                                           messageSelector, 
pubSubNoLocal);
            } else {
                consumer = session.createConsumer(destination, 
messageSelector);   <-- two different sessions used here!
            }
{code}

> MQJCA1018: Only one session per connection is allowed
> -----------------------------------------------------
>
>                 Key: CXF-7094
>                 URL: https://issues.apache.org/jira/browse/CXF-7094
>             Project: CXF
>          Issue Type: Bug
>          Components: JMS
>    Affects Versions: 3.1.6
>            Reporter: Rainer Müller
>
> We upgraded from CXF 2.7.14 to 3.16 running in EAP 7.0 container.
> The WebSphere MQ resource adapter 7.5.0 shows following error message
> - MQJCA1018: Only one session per connection is allowed
> In class JMSConduit#setupReplyDestination the existing connection is used to 
> instantiate class MessageListenerContainer.
> MessageListenerContainer#start calls createSession on given connection.
> Is there a way to force the 'one session per connection' restriction of our 
> resource adapter? In version 2.7.14 we never had this issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to