camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brad Johnson (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Deleted] (CAMEL-9570) Blueprint Proxies are not used when injected into Java RouteBuilders
Date Mon, 20 Jun 2016 16:42:05 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-9570?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Brad Johnson updated CAMEL-9570:
--------------------------------
    Comment: was deleted

(was: I don't have access to computer or code right now but ran into these
problems earlier and reported them.  When I looked at the code there is a
spot in the camel code that was making a choice about how to handle the
bean.

When I get back to a computer next week I'll take another look.  But I was
getting the same set of problems.  The bean was not getting proxied and
uninstalling the bundle didn't result in the service going away. when I
strayed to actually log the instance what I saw was the concrete type of
the bean and not a proxy.

The only solution I found was to stop using the camel DSL altogether.  That
actually worked out well.  I now use one connector class in my bundles and
inject camel routes into it and then inject that connector into other
beans.  it is
sort of an inversion of control.  The beans now invoke routes through the
connector. The connector in turn invokes other beans. It makes tearing a
snap.

It also means everything is set up in blueprint and I haven't experienced
the problem since.

)

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

Mime
View raw message