Jonathan Gallimore created TOMEE-2506:
-----------------------------------------

             Summary: TX issues with injected JMSContext
                 Key: TOMEE-2506
                 URL: https://issues.apache.org/jira/browse/TOMEE-2506
             Project: TomEE
          Issue Type: Bug
            Reporter: Jonathan Gallimore
            Assignee: Jonathan Gallimore


See JMSContextInjectionTest. There appear to be two issues here, the first 
being that a resource appears to not be released correctly at the end of an EJB 
business method, leading to messages such as:

 

WARNING: Transaction complete, but connection still has handles associated: 
ManagedConnectionInfo: 
org.apache.geronimo.connector.outbound.ManagedConnectionInfo@357c9bd9. mc: 
[org.apache.openejb.resource.activemq.jms2.TomEEManagedConnection@6d0290d8,ActiveMQConnection
 
\{id=ID:Jonathans-MBP-57290-1554375394092-9:1,clientId=ID:Jonathans-MBP-57290-1554375394092-8:1,started=false}]]
Abandoned connection information: 
 Connection handle opened at 
org.apache.geronimo.connector.outbound.ConnectionInfo.setTrace(ConnectionInfo.java:119),
 
org.apache.geronimo.connector.outbound.ConnectionHandleInterceptor.getConnection(ConnectionHandleInterceptor.java:57),
 
org.apache.geronimo.connector.outbound.TCCLInterceptor.getConnection(TCCLInterceptor.java:39),
 
org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor.getConnection(ConnectionTrackingInterceptor.java:66),
 
org.apache.geronimo.connector.outbound.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:81),
 
org.apache.activemq.ra.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:95),
 
org.apache.activemq.ra.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:67),
 
org.apache.openejb.resource.activemq.jms2.JMSContextImpl.connection(JMSContextImpl.java:82),
 
org.apache.openejb.resource.activemq.jms2.JMSContextImpl.session(JMSContextImpl.java:102),
 
org.apache.openejb.resource.activemq.jms2.JMSContextImpl.createQueue(JMSContextImpl.java:311),
 
org.apache.openejb.resource.activemq.jms2.cdi.JMS2CDIExtension$InternalJMSContext.createQueue(JMS2CDIExtension.java:376),
 
org.apache.openejb.arquillian.tests.jms.JMSSenderBean.sendToQueue(JMSSenderBean.java:37),
 
org.apache.openejb.arquillian.tests.jms.JMSSenderBean.sendToQueue(JMSSenderBean.java:33)

 

And the second being that the JMS message is sent anyway, even if the 
transaction is rolled back.

 

JMS 1 usage (i.e. not injecting JMSContext) appears to work ok.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to