camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Quinn Stevenson <qu...@pronoia-solutions.com>
Subject Re: OsgiServiceRegistry caching service references, why?
Date Thu, 18 Feb 2016 19:47:32 GMT
Tim -

Did you get a sample put together?

I tried to reproduce what you’re seeing, but I can’t seem to make it happen.

I created a camel-scr route (using the camel-archetype-scr), added a reference to an OSGi
service, and created two bundles that register implementations of this service (they just
log different stuff).

I deploy everything, start one of the service bundles and the camel-scr route.  Then I stop
the active service bundle and start the other one and the route picks-up the new implementation.
 I guess this could be because camel-scr stops the route when the dependency goes away and
then restarts it once it comes back.

How exactly are you calling/using the service?

> On Feb 11, 2016, at 1:06 PM, Tim Jones <tim@mccarthy.co.nz> wrote:
> 
> Quinn,
> 
> I will post something on Monday when back at work. However it shouldn't be
> hard to replicate if you uninstall the bundle providing the service and
> install a modified bundle offering the same service but with different
> functionality (e.g. perhaps just output something different to the console).
> Because the service from the original bundle has been cached it will be that
> service that is called, not the service from the newly installed modified
> bundle.
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/OsgiServiceRegistry-caching-service-references-why-tp5777410p5777617.html
> Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message