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

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

Quinn,

Just got back in the country and to a computer so wanted to look at this again. 
 I did a search to look for an issue I'd reported previously.  I don't know if 
this bears on the same issue you are seeing here.  

https://issues.apache.org/jira/browse/CAMEL-9562

Perhaps if it is then 9562 should be raised to the level of a bug with a 
proposed fix or closed and incorporated into this one since you have captured a 
lot of information. Since you've delved into this a lot deeper do you think 
these are related issues?

In any case, if a route builder or camel context are in the context of 
Blueprint I don't think they should fall back to using the global classloader 
if it can't find a class.  The problem is that means if I've misconfigured my 
bundle(s) somehow the code can still work but it breaks the classloader 
mechanics.  However, just globally changing it at this time might break things 
that are "accidentally" working because they are using the global classloader.

But I'd certainly like to be able to specify a strict mode for blueprint so 
that if the OSGi proxy mechanism and classloader can't find the class I'm 
specifying it shouldn't just fall back on using a global classloader reach 
around.


> 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