[ 
https://issues.apache.org/jira/browse/CAMEL-9570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15302684#comment-15302684
 ] 

Brad Johnson commented on CAMEL-9570:
-------------------------------------

Interesting.  I guess you can't post any of the XML?  Did this just start
happening with a newer version of Camel or is this older?  This sort of
news makes me get nervous.   When I expect the behavior to be one way and
something else happens it can be a bit disconcerting.  You mentioned that
you have two blueprint files.  Are you exporting the service from one
bundle and then pulling it by reference in another bundle or are they in
the same bundle/classloader.  When I ran into the problem before what was
especially disconcerting is that the class that implemented the service
interface was explicitly private it in its own bundle.  If something were
wired wrong what I'd expect is a class not found exception but the loader
was actually finding the explicitly private class in that other bundle and
using a reference to it.  So like you I didn't see the timeout happen when
I uninstalled the service provider bundle. Instead the reference to the
concrete implementation was being held onto by the consumer.

At that point you're in classloader hell.

On Thu, May 26, 2016 at 1:04 PM, Quinn Stevenson (JIRA) <[email protected]>



> 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)

Reply via email to