TransactionManager tm = (TransactionManager) gtmfb.getObject();
tt = new TransactionTemplate(new JtaTransactionManager((UserTransaction) tm));
BrokerFactoryBean bfb = new BrokerFactoryBean();
bfb.setConfig(new ClassPathResource("org/servicemix/jbi/nmr/flow/jca/broker.xml"));
bfb.afterPropertiesSet();
broker = (BrokerContainer) bfb.getObject();
JCAFlow senderFlow = new JCAFlow();
senderFlow.setJmsURL("tcp://localhost:61216");
senderFlow.setTransactionContextManager(tcm);