camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Ashley <>
Subject Re: starting and stopping routes created via spring and @Consume
Date Wed, 15 Jan 2014 23:47:18 GMT
Thanks Claus,

I looked at the running app via jconsole but didn't see anything useful in
the MBeans.  Ultimately I didn't use JMX.  Instead I've created a simple
custom message listener container factory along the lines below.

public class CustomMessageListenerContainerFactory
    implements MessageListenerContainerFactory {

  private Map<JmsEndpoint, AbstractMessageListenerContainer> containers =
new HashMap<>();

  public AbstractMessageListenerContainer
createMessageListenerContainer(JmsEndpoint endpoint) {
    DefaultMessageListenerContainer messageListenerContainer = new
    containers.put(endpoint, messageListenerContainer);
    return messageListenerContainer;

  public AbstractMessageListenerContainer
getMessageListenerContainer(JmsEndpoint endpoint) {
    return containers.get(endpoint);

This seems to do the trick as I can access and start/stop the containers
directly.  Can you see any gotchas with this approach?

Thanks, Jeremy

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message