This is serendipitous as I've recently run into this as well.  I switched
from straight Blueprint routes and instantiation to using blueprint to
bootstrap the routebuilder(s).  But the injection of the reference to the
service from blueprint doesn't appear to be proxied as I see the concrete
class and the hot swapping isn't working as expected.

If I'm understanding this correctly it doesn't matter if the route builder
is bootstrapped through blueprint it is still going to use the simple
registry mechanics instead of the OSGi service registry.  In bundle A I have
blueprint that looks like:

        <service interface="my.services.api.InvoiceDocumentService">
                <bean class="my.services.test.internal.TestInvoiceServiceImpl" 
/>
        </service>

In bundle B I have this startup.
        <camelContext xmlns="http://camel.apache.org/schema/blueprint";>
                <package>my.routes.internal</package>
        </camelContext>

In the routes package I have an @BeanInject for the
my.services.api.InvoiceDocumentService.  They live in different bundles and
the internals are not exported.  But when I do a .getClass().getName on the
service api received in bundle B it shows the implementation class.  I don't
believe that's the proxy class.

So it appears that using this mechanic is skirting the OSGi service proxying
mechanism.  Is that a correct assessment?



--
View this message in context: 
http://camel.465427.n5.nabble.com/Invoking-Dynamic-OSGi-Blueprint-services-from-a-Java-RouteBuilder-tp5776755p5776848.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to