camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Ashley <jeremy.ash...@gmail.com>
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<>();

  @Override
  public AbstractMessageListenerContainer
createMessageListenerContainer(JmsEndpoint endpoint) {
    DefaultMessageListenerContainer messageListenerContainer = new
DefaultMessageListenerContainer();
    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: http://camel.465427.n5.nabble.com/starting-and-stopping-routes-created-via-spring-and-Consume-tp5745973p5746011.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message