This might be a red herring, but I think I've experienced something similar when using Spring's @ManagedResource with JPA @Transational in the same class (perhaps not the best practice, but that's a different topic). The @Transactional annotations were processed first, creating a proxy object, but this proxy did not preserve the class-level @ManagedResource. At least that was my diagnosis of the situation.
Is camel creating proxies for beans used in routes prior to Springs BeanPostProcessor phase? I think camel does something to wrap the bean in a Processor instance, but I don't know all the details. Perhaps debug as your context starts up and see what beans are actually being analyzed for post processing. HTH, Doug On Fri, May 29, 2009 at 7:15 AM, Claus Ibsen <claus.ib...@gmail.com> wrote: > Hi > > A hibernate user had an issue with using some @ hibernate annotations > with Camel. > And another one had a problem with running it from Gerinimo Server. > > There is something lurking in there, that causes these annotations to > not being applied. > > I have not had the time to debug and investigate myself. Any help is > of course appreciated. > > > > On Fri, May 29, 2009 at 1:20 PM, Martin Gilday <martin.li...@imap.cc> > wrote: > > Hi, > > > > I am having trouble with camel-spring (1.6.0) and a > > InstantiationAwareBeanPostProcessorAdapter I have written. It processes > > a custom annotation to set fields on Spring beans directly from > > .properties files. The processor works correctly until I try to > > @Autowired into a Java Camel RouteBuilder. The processor is not invoked > > at all for any bean that the route builder uses. This is also true for > > any bean that is injected into a bean that the route builder uses. From > > my logging in my processor I can see that it is not invoked at all for > > these beans. Has anyone any idea why this ay be? Does Camel do any > > magic with beans it finds referenced by a route builder, such as moving > > them into another context that won't be covered by my processor? > > > > Also this page [1] refers to <routeBuilder ref="myBuilder" /> which I > > think should be <routeBuilderRef ref="myBuilder" />, but it is in a > > source file that the wiki includes so I can't correct it. > > > > Thanks, > > Martin. > > > > > > -- > Claus Ibsen > Apache Camel Committer > > Open Source Integration: http://fusesource.com > Blog: http://davsclaus.blogspot.com/ > Twitter: http://twitter.com/davsclaus >