Closed geemang2000 closed 12 years ago
Editing snafu... Issue should be open...
You can always create a bean that implements the Processor interface (really simple) and use it instead. That way you can have dependency injection for your processor and inject service reference.
Hope it helps.
Best regards, Matthias
2011/12/1 geemang2000 < reply@reply.github.com
I'd like to reference a service in a process method. There are times where the bean syntax doesn't cut it and you need to reference a service directly.
e.g.
.process(new Processor() { public void process(Exchange exchange) throws Exception { myService.doSomethingWithaLotOfArgs('sdf', 'sdf', []) })
Can we
class MyRoute = { }
Reply to this email directly or view it on GitHub: https://github.com/padcom/grails-routing/issues/4
FYI: I've extended the routing-jms example so that it contains such a processor referenced from Spring context.
Here's the commit: https://github.com/padcom/grails-routing-jms-example/commit/13125a00a293e8266e0dd021f3e70c0b68f8ebab
I'd like to reference a service in a process method. There are times where the bean syntax doesn't cut it and you need to reference a service directly.
e.g.
Can the Route closure be enhanced to allow definition of a service ??