You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by GitBox <gi...@apache.org> on 2022/04/22 00:12:00 UTC

[GitHub] [cxf] reta commented on a diff in pull request #940: Migrate to ActiveMQ Artemis (2-nd attempt)

reta commented on code in PR #940:
URL: https://github.com/apache/cxf/pull/940#discussion_r855677308


##########
rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/util/MessageListenerTest.java:
##########
@@ -174,33 +183,21 @@ private void testTransactionalBehaviour(Connection connection, Queue dest) throw
     }
 
     private static Connection createConnection(String name) throws JMSException {
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://" + name
-                                                                     + "?broker.persistent=false");
-        cf.setRedeliveryPolicy(redeliveryPolicy());
+        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://" + name);
         Connection connection = cf.createConnection();
         connection.start();
         return connection;
     }
 
     private static Connection createXAConnection(String name, TransactionManager tm) throws JMSException {
-        ActiveMQXAConnectionFactory cf = new ActiveMQXAConnectionFactory("vm://" + name
-                                                                         + "?broker.persistent=false&jms.xaAckMode=1");
-        cf.setRedeliveryPolicy(redeliveryPolicy());
-        XaPooledConnectionFactory cfp = new XaPooledConnectionFactory(cf);
-        cfp.setTransactionManager(tm);
-        cfp.setConnectionFactory(cf);
-        Connection connection = cfp.createConnection();
+        ActiveMQXAConnectionFactory cf = new ActiveMQXAConnectionFactory("vm://" + name);
+        ConnectionFactory cf1 = new ConnectionFactoryProxy(cf, new TransactionHelperImpl(tm));

Review Comment:
   @ehsavoie I found a simpler way to integrate with JTA using `ConnectionFactoryProxy` and `TransactionHelperImpl`, the tests are passing right now (except `testConnectionProblemXA`, it has different cause)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@cxf.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org