-
Bug
-
Resolution: Won't Do
-
Critical
-
7.0.0.ER4
-
None
Calling method commit(), rollback() on UserTransaction in MessageDrivenBean, closes any JMS connections which was part of this transaction.
I see this behavior when running TCK6 with A-MQ 6.2.0 (resource adapter activemq-rar-5.11.0.rar) and A-MQ 6.2.1 (resource adapter activemq-rar-5.11.0.redhat-621084.rar) in conjunction with EAP 7.0.0.ER4
The issue might be related to JBEAP-2344
Impact for customers:
Incorrect behavior of UserTransactions causes that after rollback is called, any JMS connection which was part of this transaction, is closed. Connection must be created.
Test fails with:
[javatest.batch] 01-17-2016 10:22:36: Opened connection to http://localhost:8080/transaction_servlet_vehicle_web/servlet_vehicle [javatest.batch] 01-17-2016 10:22:37: SVR-ERROR: Exception at: [javatest.batch] 01-17-2016 10:22:37: Test status from a servlet: 1:Test case throws exception: Test Failed! [javatest.batch] 01-17-2016 10:22:37: SVR-ERROR: javax.jms.IllegalStateException: The Consumer is closed [javatest.batch] at org.apache.activemq.ActiveMQMessageConsumer.checkClosed(ActiveMQMessageConsumer.java:865) [javatest.batch] at org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:622) [javatest.batch] at com.sun.ts.tests.jms.ee.ejbweb.xa.TransactionTests.Test01(TransactionTests.java:263) [javatest.batch] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [javatest.batch] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [javatest.batch] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [javatest.batch] at java.lang.reflect.Method.invoke(Method.java:497) [javatest.batch] at com.sun.ts.lib.harness.EETest.run(EETest.java:495) [javatest.batch] at com.sun.ts.lib.harness.ServiceEETest.run(ServiceEETest.java:113) [javatest.batch] at com.sun.ts.tests.common.vehicle.servlet.ServletVehicle.runTest(ServletVehicle.java:115) [javatest.batch] at com.sun.ts.tests.common.vehicle.servlet.ServletVehicle.doGet(ServletVehicle.java:83) [javatest.batch] at com.sun.ts.tests.common.vehicle.servlet.ServletVehicle.doPost(ServletVehicle.java:105) [javatest.batch] at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) [javatest.batch] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [javatest.batch] at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [javatest.batch] at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) [javatest.batch] at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [javatest.batch] at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78) [javatest.batch] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [javatest.batch] at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [javatest.batch] at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) [javatest.batch] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [javatest.batch] at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) [javatest.batch] at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) [javatest.batch] at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) [javatest.batch] at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) [javatest.batch] at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50) [javatest.batch] at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) [javatest.batch] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [javatest.batch] at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61) [javatest.batch] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [javatest.batch] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [javatest.batch] at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:284) [javatest.batch] at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:263) [javatest.batch] at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) [javatest.batch] at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:174) [javatest.batch] at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202) [javatest.batch] at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:793) [javatest.batch] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [javatest.batch] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [javatest.batch] at java.lang.Thread.run(Thread.java:745) [javatest.batch] [javatest.batch] 01-17-2016 10:22:37: SVR: Test running in servlet vehicle failed [javatest.batch] 01-17-2016 10:22:37: Test: returning from running in a servlet vehicle [javatest.batch] STATUS:Failed.Test case throws exception: Test Failed!
Server log:
2016-01-17 10:22:43,229 INFO [org.apache.activemq.broker.TransportConnector] (EJB default - 5) Connector vm://localhost started 2016-01-17 10:22:43,249 ERROR [org.jboss.jca.core.connectionmanager.listener.TxConnectionListener] (EJB default - 5) IJ000315: Pool QueueConnectionFactory has 1 active handles 2016-01-17 10:22:43,252 ERROR [org.jboss.jca.core.connectionmanager.listener.TxConnectionListener] (EJB default - 5) IJ000315: Pool DURABLE_SUB_CONNECTION_FACTORY has 1 active handles 2016-01-17 10:22:43,255 INFO [org.apache.activemq.broker.TransportConnector] (EJB default - 5) Connector vm://localhost stopped
Example of the failing test:
UserTransaction ut = (UserTransaction) context.lookup("java:comp/UserTransaction"); Queue queue = (Queue) context.lookup("java:comp/env/jms/QUEUE_BMT"); QueueSender sender = session.createSender(queue); QueueReceiver receiver = session.createReceiver(queue); ut.begin(); sender.send(msg); ut.commit(); ut.begin(); TextMessage rsgRec = (TextMessage) receiver.receive(timeout); // throws exception here ut.commit();
Failed tests (everything in module jms/ee/ejbweb):
[javatest.batch] FAILED........com/sun/ts/tests/jms/ee/ejbweb/xa/TransactionTests.java#Test01_from_ejb [javatest.batch] FAILED........com/sun/ts/tests/jms/ee/ejbweb/xa/TransactionTests.java#Test01_from_jsp [javatest.batch] FAILED........com/sun/ts/tests/jms/ee/ejbweb/xa/TransactionTests.java#Test01_from_servlet [javatest.batch] FAILED........com/sun/ts/tests/jms/ee/ejbweb/xa/TransactionTests.java#Test02_from_ejb [javatest.batch] FAILED........com/sun/ts/tests/jms/ee/ejbweb/xa/TransactionTests.java#Test02_from_jsp [javatest.batch] FAILED........com/sun/ts/tests/jms/ee/ejbweb/xa/TransactionTests.java#Test02_from_servlet [javatest.batch] FAILED........com/sun/ts/tests/jms/ee/ejbweb/xa/TransactionTests.java#Test03_from_ejb [javatest.batch] FAILED........com/sun/ts/tests/jms/ee/ejbweb/xa/TransactionTests.java#Test03_from_jsp [javatest.batch] FAILED........com/sun/ts/tests/jms/ee/ejbweb/xa/TransactionTests.java#Test03_from_servlet [javatest.batch] FAILED........com/sun/ts/tests/jms/ee/ejbweb/xa/TransactionTests.java#Test04_from_ejb [javatest.batch] FAILED........com/sun/ts/tests/jms/ee/ejbweb/xa/TransactionTests.java#Test04_from_jsp [javatest.batch] FAILED........com/sun/ts/tests/jms/ee/ejbweb/xa/TransactionTests.java#Test04_from_servlet [javatest.batch] FAILED........com/sun/ts/tests/jms/ee/ejbweb/xa/TransactionTests.java#Test05_from_ejb [javatest.batch] FAILED........com/sun/ts/tests/jms/ee/ejbweb/xa/TransactionTests.java#Test05_from_jsp [javatest.batch] FAILED........com/sun/ts/tests/jms/ee/ejbweb/xa/TransactionTests.java#Test05_from_servlet [javatest.batch] FAILED........com/sun/ts/tests/jms/ee/ejbweb/xa/TransactionTests.java#Test06_from_ejb [javatest.batch] FAILED........com/sun/ts/tests/jms/ee/ejbweb/xa/TransactionTests.java#Test06_from_jsp [javatest.batch] FAILED........com/sun/ts/tests/jms/ee/ejbweb/xa/TransactionTests.java#Test06_from_servlet [javatest.batch] FAILED........com/sun/ts/tests/jms/ee/ejbweb/xa/TransactionTests.java#Test07_from_ejb [javatest.batch] FAILED........com/sun/ts/tests/jms/ee/ejbweb/xa/TransactionTests.java#Test07_from_jsp [javatest.batch] FAILED........com/sun/ts/tests/jms/ee/ejbweb/xa/TransactionTests.java#Test07_from_servlet [javatest.batch] FAILED........com/sun/ts/tests/jms/ee/ejbweb/xa/TransactionTests.java#Test08_from_ejb [javatest.batch] FAILED........com/sun/ts/tests/jms/ee/ejbweb/xa/TransactionTests.java#Test08_from_jsp [javatest.batch] FAILED........com/sun/ts/tests/jms/ee/ejbweb/xa/TransactionTests.java#Test08_from_servlet
- is cloned by
-
ENTMQ-1492 Client closes connection after calling commit() or rollback() on UserTransaction
- Closed
- is related to
-
JBEAP-2344 UserTransaction commit(), rollback() closes connection in Websphere MQ 7.5
- Closed
- relates to
-
JBEAP-1805 Create content necessary for 'Provide Support for JBoss A-MQ v6 as the external JMS Provider'
- Closed