containerConnector.setResourceAdapter(resourceAdapter);
containerConnector.setEndpointFactory(new SingletonEndpointFactory(this, getTransactionManager()));
containerConnector.afterPropertiesSet();
// Outbound connector
ActiveMQManagedConnectionFactory mcf = new ActiveMQManagedConnectionFactory();
mcf.setResourceAdapter(resourceAdapter);
ConnectionFactory cf = (ConnectionFactory) mcf.createConnectionFactory(getConnectionManager());
jmsTemplate = new JmsTemplate(cf);
jmsTemplate.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
jmsPersistentTemplate = new JmsTemplate(cf);
jmsPersistentTemplate.setDeliveryMode(DeliveryMode.PERSISTENT);