2008/9/2 Conrad Pilloud <[EMAIL PROTECTED]>: > > I had the big "A ha!" moment over the weekend as I was driving across > Nebraska. My Dynamic Router (DR) POJO only needs to "be alive" when > responding to requests from the administrator person; Elements within Camel > "are alive" when processing a message. So... just like the DR EIP pattern > suggests, I'll implement a Control Channel as a static Camel Route which > receives requests from the administrator and then creates/destroys/manages a > separate set of dynamic Camel Routes. I just need my POJO to implement > Processor IF and set up the static route to pass the administrative requests > to it.
BTW you could write your DR POJO without implementing Processor and just use the bean binding to inject message headers & body objects into your method calls... http://activemq.apache.org/camel/bean-integration.html also if you use from("...").bean(MyClass.class); then Camel will use Spring/Guice to instantiate and inject your bean - which can then be either a singleton or per request bean; using Spring's scopes etc. -- James ------- http://macstrac.blogspot.com/ Open Source Integration http://open.iona.com