BrokerFactoryBean bfb = new BrokerFactoryBean(new ClassPathResource("org/apache/servicemix/jbi/nmr/flow/jca/broker.xml"));
bfb.afterPropertiesSet();
broker = bfb.getBroker();
broker.start();
JCAFlow senderFlow = new JCAFlow();
senderFlow.setJmsURL("tcp://localhost:61216");
senderFlow.setTransactionContextManager(tcm);
senderContainer.setTransactionManager(tm);
senderContainer.setEmbedded(true);
senderContainer.setName("senderContainer");
senderContainer.setFlow(senderFlow);
senderContainer.setMonitorInstallationDirectory(false);
senderContainer.init();
senderContainer.start();
JCAFlow receiverFlow = new JCAFlow();
receiverFlow.setJmsURL("tcp://localhost:61216");
receiverFlow.setTransactionContextManager(tcm);
receiverContainer.setTransactionManager(tm);
receiverContainer.setEmbedded(true);
receiverContainer.setName("receiverContainer");
receiverContainer.setFlow(receiverFlow);
receiverContainer.setMonitorInstallationDirectory(false);