use of org.hornetq.jms.server.embedded.EmbeddedJMS 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.hornetq.jms.server.embedded.EmbeddedJMS 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