[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] ServiceListener ignored after Service Replacement

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.

Regards
Neil

> Hi,
>
> 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
> B.
> The Service object used in A is wrapped by a dynamic proxy for managing
> the
> service object and some synchronization issues. This proxy registers a
> Service listener, using the Context of Bundle A, to react on Service
> changes
> in B and there is the problem:
>
>
>
> If bundle B gets uninstalled everything works fine, the Listener gets
> called
> on the UNREGISTERING Event, the service object in the proxy is freed, but
> if
> 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
> and
> 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
> implementation?
>
>
>
> Regards,
>
> Thomas Fischer
>
>
>
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
>