You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by DanD <DD...@UP.COM> on 2010/02/11 22:15:45 UTC
Spring AOP problem with Camel Parameter Annotations
I've noticed that if I use Spring's autoproxy capability
(<aop:aspectj-autoproxy />) with an Aspect intercepting camel processors,
that method calls with parameter annotations seem to get screwed up. I've
noticed and replicated this on a number of different methods of mine. Is
this an existing problem with Apache Camel or with Spring framework?
// Fails with various errors depending on what the code does, basically o is
going to be null or even the value of what would have been a following
parameter if there are multiple parameters.
public void process(@Parameter(value="foobar") Object o) {
}
Same code with a different signature
// Works just fine
public void process(Exchange e) {
Object o = e.getParameters("foobar");
}
--
View this message in context: http://old.nabble.com/Spring-AOP-problem-with-Camel-Parameter-Annotations-tp27554783p27554783.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Spring AOP problem with Camel Parameter Annotations
Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Feb 11, 2010 at 10:15 PM, DanD <DD...@up.com> wrote:
>
> I've noticed that if I use Spring's autoproxy capability
> (<aop:aspectj-autoproxy />) with an Aspect intercepting camel processors,
> that method calls with parameter annotations seem to get screwed up. I've
> noticed and replicated this on a number of different methods of mine. Is
> this an existing problem with Apache Camel or with Spring framework?
>
> // Fails with various errors depending on what the code does, basically o is
> going to be null or even the value of what would have been a following
> parameter if there are multiple parameters.
> public void process(@Parameter(value="foobar") Object o) {
> }
>
> Same code with a different signature
>
> // Works just fine
> public void process(Exchange e) {
> Object o = e.getParameters("foobar");
> }
> --
> View this message in context: http://old.nabble.com/Spring-AOP-problem-with-Camel-Parameter-Annotations-tp27554783p27554783.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
Try Apache Camel 2.2 where this has been fixed.
--
Claus Ibsen
Apache Camel Committer
Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus