Search in sources :

Example 1 with MyBeanLocator

use of org.apache.cxf.transport.jms.uri.MyBeanLocator in project cxf by apache.

the class JMSConfigFactoryTest method testTransactionManagerFromBus.

@Test
public void testTransactionManagerFromBus() throws XAException, NamingException {
    Bus bus = BusFactory.newInstance().createBus();
    ConfiguredBeanLocator cbl = bus.getExtension(ConfiguredBeanLocator.class);
    MyBeanLocator mybl = new MyBeanLocator(cbl);
    bus.setExtension(mybl, ConfiguredBeanLocator.class);
    TransactionManager tmExpected = new GeronimoTransactionManager();
    mybl.register("tm", tmExpected);
    tmByName(bus, tmExpected);
    tmByClass(bus, tmExpected);
}
Also used : Bus(org.apache.cxf.Bus) ConfiguredBeanLocator(org.apache.cxf.configuration.ConfiguredBeanLocator) GeronimoTransactionManager(org.apache.geronimo.transaction.manager.GeronimoTransactionManager) TransactionManager(javax.transaction.TransactionManager) MyBeanLocator(org.apache.cxf.transport.jms.uri.MyBeanLocator) GeronimoTransactionManager(org.apache.geronimo.transaction.manager.GeronimoTransactionManager) Test(org.junit.Test)

Aggregations

TransactionManager (javax.transaction.TransactionManager)1 Bus (org.apache.cxf.Bus)1 ConfiguredBeanLocator (org.apache.cxf.configuration.ConfiguredBeanLocator)1 MyBeanLocator (org.apache.cxf.transport.jms.uri.MyBeanLocator)1 GeronimoTransactionManager (org.apache.geronimo.transaction.manager.GeronimoTransactionManager)1 Test (org.junit.Test)1