On 8/2/07, Punnoose, Roshan <[EMAIL PROTECTED]> wrote: > I want to define my routes and logic in Spring, and I believe I see how > to do this.
Great > Is it now possible to intercept all calls to a POJO and have > it run through the routes that I have specified for that POJO? Do you mean using Camel routes as a proxy to some service (kinda like Spring-Remoting) http://activemq.apache.org/camel/bean-integration.html you can do this using the CamelProxyFactoryBean http://cwiki.apache.org/CAMEL/spring-remoting.html Or do you mean you want to use Camel purely as an interceptor - called before the bean is actually called to fire off some arbitrary messages etc? Kinda like a POJO version of a wire tap > For example, I want to set up an EJB that calls a Spring injected POJO. > When the EJB calls the POJO, depending on the method called, Camel will > route the request to a particular JMS queue. From there, Camel will then > use routing rules set up for that queue to process and filter and send > the message to another POJO. Yeah - I think you just want to create a proxy to the POJO as described above - this creates the client side stub which would send the message to some endpoint/route. Then on the server side you'd consume from some queue and route to the Spring POJO > I feel like the only thing I am missing is abstracting the Camel routes > and logic so that I can just call the POJO directly and still have the > routes applied. Yeah - right now you either use a client side proxy to fire a message route; then on the server you consume messages and bind them to POJOs. We could also add an interceptor which just sends a message to camel before actually invoking a POJO method. -- James ------- http://macstrac.blogspot.com/