[ https://issues.apache.org/jira/browse/CAMEL-9570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15147772#comment-15147772 ]
Brad Johnson commented on CAMEL-9570: ------------------------------------- Richard, When you say you can replicate using a routebuilder are you using an annotation for the injection? If I recall that's how I ran into the problem. That's when I started looking at the package scanners. That may be an unrelated problem. But as you say, if one manually injects the reference it works fine. If I use the @BeanInject annotation I'll get a concrete implementation of the interface I'm specifying. If I manually inject it via blueprint XML the class will instead be shown as com.sun.proxy.$Proxy40 I was getting similar unexpected behaviors if I used @Produce or @Consume annotations. So there appears to be a fundamental difference in the way the references are being handled in annotation processing versus straight XML. > Blueprint Proxies are not used when injected into Java RouteBuilders > -------------------------------------------------------------------- > > Key: CAMEL-9570 > URL: https://issues.apache.org/jira/browse/CAMEL-9570 > Project: Camel > Issue Type: Bug > Components: camel-blueprint, camel-core > Affects Versions: 2.16.2 > Reporter: Quinn Stevenson > Assignee: Christian Schneider > > Basic Conditions: > - Java interface used for OSGi Services > - Implementation of the Java interface registered as a OSGi service. Note > that the package containing implementation is NOT exported > - A Java RouteBuilder that uses the Java interface via bean(...) DSL calls, > with a setter for the bean implementing the interface > - Wire everything together with Blueprint - create a <reference ...> for the > service, a <bean ...> for the RouteBuilder and inject the service reference, > and use the RouteBuilder in a CamelContext. > After all this is deployed, stop the bundle implementing the service. A > ServiceUnavailableException should be thrown after a timeout, but the object > that was injected into the RouteBuilder process the request - so the > Blueprint Proxy is not used. -- This message was sent by Atlassian JIRA (v6.3.4#6332)