final CountDownLatch receivedCountDown = new CountDownLatch(1);
// Configure the components
ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
container.addComponent("activemq", jmsComponentClientAcknowledge(connectionFactory));
PojoComponent component = new PojoComponent();
component.addService("listener", new MessageListener(){
public void onMessage(Message msg) {
System.out.println("Received: "+msg);
receivedCountDown.countDown();
}
});