2017-07-13 78 views

回答

1

只是這樣的:

ActiveMQComponent answer = ActiveMQComponent.activeMQComponent(); 
ActiveMQConnectionFactory jmsConnectionFactory = new ActiveMQConnectionFactory("tcp://localhost:61616"); 
PooledConnectionFactory pooledConnectionFactory = new PooledConnectionFactory(jmsConnectionFactory); 
((ActiveMQConfiguration) answer.getConfiguration()).setConnectionFactory(pooledConnectionFactory); 
context.addComponent("activemq", answer); 
相關問題