use of io.micronaut.jms.pool.PooledConnection in project micronaut-jms by micronaut-projects.
the class CustomBrokerSpec method testCustomBroker.
@Test
void testCustomBroker() throws JMSException {
JMSConnectionPool connectionPool = applicationContext.getBean(JMSConnectionPool.class, Qualifiers.byName(CONNECTION_FACTORY_BEAN_NAME));
Connection connection = connectionPool.createConnection();
assertTrue(connection instanceof PooledConnection);
Connection realConnection = ((PooledConnection) connection).get();
assertTrue(realConnection instanceof XAConnection);
}
Aggregations