[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [equinox-dev] ServiceListener ignored after Service Replacement
- From: "Neil Bartlett" <njbartlett@xxxxxxxxx>
- Date: Thu, 12 Apr 2007 13:46:36 +0100 (BST)
- Delivered-to: email@example.com
- Importance: Normal
- User-agent: SquirrelMail/1.4.5
You said that bundle B* is "installed". Do you mean "started"? If B* is
only installed but not activated, then it cannot register a service, and
naturally your ServiceListener will not be notified.
If that's not the problem, then check that the service registered by B*
matches the filter under which A is listening. Depending on the filter you
have used in the addServiceListener() call, you might not be matching B*'s
service, e.g. if the properties are a little different.
Also take a look at the output of the Equinox commands "ss" and
"services". This might show up something useful.
> maybe this is just a stupid simple question, and I just don't see the
> solution, if that's the matter sorry for bothering you.
> But here the scenario:
> I have 2 bundles A and B, A is using a service exported and registered by
> The Service object used in A is wrapped by a dynamic proxy for managing
> service object and some synchronization issues. This proxy registers a
> Service listener, using the Context of Bundle A, to react on Service
> in B and there is the problem:
> If bundle B gets uninstalled everything works fine, the Listener gets
> on the UNREGISTERING Event, the service object in the proxy is freed, but
> a new bundle B*, implementing and exporting the service exported by former
> B, is installed, the Listener doesn't get called on the REGISTERED Event
> so the Proxy cannot do its work and react to the again available Service.
> What do I miss? Is there any special filtering done in the equinox
> Thomas Fischer
> equinox-dev mailing list