use of org.jboss.narayana.jta.jms.ConnectionFactoryProxy in project narayana by jbosstm.
the class AbstractIntegrationTests method initJms.
protected void initJms() throws Exception {
jmsServer = JMS_HELPER.startServer();
queue = (Queue) jmsServer.lookup(JmsHelper.QUEUE_NAME);
ConnectionFactory connectionFactory = new ConnectionFactoryProxy((XAConnectionFactory) jmsServer.lookup(JmsHelper.FACTORY_NAME), new TransactionHelperImpl(TransactionManager.transactionManager()));
connection = connectionFactory.createConnection();
connection.start();
}
use of org.jboss.narayana.jta.jms.ConnectionFactoryProxy in project spring-boot by spring-projects.
the class NarayanaXAConnectionFactoryWrapper method wrapConnectionFactory.
@Override
public ConnectionFactory wrapConnectionFactory(XAConnectionFactory xaConnectionFactory) {
XAResourceRecoveryHelper recoveryHelper = getRecoveryHelper(xaConnectionFactory);
this.recoveryManager.registerXAResourceRecoveryHelper(recoveryHelper);
return new ConnectionFactoryProxy(xaConnectionFactory, new TransactionHelperImpl(this.transactionManager));
}
use of org.jboss.narayana.jta.jms.ConnectionFactoryProxy in project jbpm by kiegroup.
the class AsyncAuditLogProducerTest method startHornetQServer.
private void startHornetQServer() throws Exception {
jmsServer = new EmbeddedJMS();
jmsServer.start();
logger.debug("Started Embedded JMS Server");
XAConnectionFactory connectionFactory = (XAConnectionFactory) jmsServer.lookup("ConnectionFactory");
new InitialContext().rebind("java:comp/UserTransaction", com.arjuna.ats.jta.UserTransaction.userTransaction());
new InitialContext().rebind("java:comp/TransactionManager", com.arjuna.ats.jta.TransactionManager.transactionManager());
new InitialContext().rebind("java:comp/TransactionSynchronizationRegistry", new com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple());
factory = new ConnectionFactoryProxy(connectionFactory, new TransactionHelperImpl(com.arjuna.ats.jta.TransactionManager.transactionManager()));
queue = (Queue) jmsServer.lookup("/queue/exampleQueue");
}
use of org.jboss.narayana.jta.jms.ConnectionFactoryProxy in project jbpm by kiegroup.
the class JmsAvaiableJobExecutorTest method startHornetQServer.
private void startHornetQServer() throws Exception {
jmsServer = new EmbeddedJMS();
jmsServer.start();
logger.debug("Started Embedded JMS Server");
XAConnectionFactory connectionFactory = (XAConnectionFactory) jmsServer.lookup("ConnectionFactory");
new InitialContext().rebind("java:comp/UserTransaction", com.arjuna.ats.jta.UserTransaction.userTransaction());
new InitialContext().rebind("java:comp/TransactionManager", com.arjuna.ats.jta.TransactionManager.transactionManager());
new InitialContext().rebind("java:comp/TransactionSynchronizationRegistry", new com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple());
factory = new ConnectionFactoryProxy(connectionFactory, new TransactionHelperImpl(com.arjuna.ats.jta.TransactionManager.transactionManager()));
queue = (Queue) jmsServer.lookup("/queue/exampleQueue");
}
Aggregations