aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rastislav Papp (JIRA)" <>
Subject [jira] [Created] (ARIES-1921) AbstractServiceReferenceRecipe - why is *tracked* attribute closed on stop?
Date Sat, 10 Aug 2019 15:17:00 GMT
Rastislav Papp created ARIES-1921:

             Summary: AbstractServiceReferenceRecipe - why is *tracked* attribute closed on
                 Key: ARIES-1921
             Project: Aries
          Issue Type: Question
          Components: Blueprint
    Affects Versions: blueprint-core-1.8.0
         Environment: JBoss Fuse 630396 (blueprint.core-1.8.0), camel 2.17.0, windows
            Reporter: Rastislav Papp

I'm experiencing difficulties with osgi service references - I'm unsure if this is the right
way of asking about it - but I'll give it a try.

I've got 2 bundles - lets call them Producer and Consumer. Producer produces an OSGI service,
and Consumer uses it, via blueprint reference:
{code:xml}<reference id="myTestService" interface="" timeout="30000"/>{code}
When the producer is restarted, Consumer's reference starts pointing to the old version of
the service, instead of the new one, and stays in that state until I manually restart the
consumer. This only happens under the condition that I use Camel and it's {{@BeanInject}}
annotation to inject the service into a bean.
I've debugged this quite a lot, but I'm not very familiar with the codebase. I've managed
to track the problem down to {{AbstractServiceReferenceRecipe#tracked}} attribute, which ends
up with {{closed = true}}, and keeps that way forever. This happens when {{BlueprintContainerImpl#processProcessors}}
calls {{untrackServiceReferences}}. I can provide a test project, with 3 bundles - Producer,
Consumer (in which the problem occurrs) and ConsumerWithoutCamel (which works fine), if necessary.

I tried to fix this by commenting out {{tracked.close()}} in {{AbstractServiceReferenceRecipe#stop}},
but I fear that this will have other side effects, which I can't forsee with my level of familiarity
with this framework :-) 
Maybe the author of {{Tracked}} class - [~gnt] - could help?

Thank you very much,

Rastislav Papp

This message was sent by Atlassian JIRA

View raw message