|
|
Re: ServiceTracker [message #72717 is a reply to message #72683] |
Thu, 31 August 2006 08:54 |
Marco Lehmann-Mörz Messages: 53 Registered: July 2009 |
Member |
|
|
Hi Tom,
unfortunatly, I changed my code to use the extension registry and
therefore extension points. I had several problems with only resolved
and not started bundles.
In spite of that fact I tried to enforce to problem again. I can't. I
tried several scenarios:
1. Plugin A and Plugin B are completly independent of each other
2. Plugin B depends on Plugin A (the service interface is defined in
PluginA)
Both cases work as expected. The service tracker gets informed in both
cases. I must have done something wrong, but I can't remember what.
I'll keep watching.
Thanks for your reply, Tom.
Bye, Marco
Tom Watson schrieb:
> Hi Marco,
>
> Yes the ServiceTracker should be informed. Before I ask you to open a
> bug report can you tell me more about the ServiceTracker you are
> creating? Do you use a ServiceTrackerCustomizer? If so what do you do
> in the ServiceTrackerCustomizer.addingService method? For a service to
> be tracked by ServiceTracker the ServiceTrackerCustomizer must return a
> non-null object to be tracked from the addingService method.
>
> If you are using a ServiceTrackerCustomizer and returning non-null from
> addingService then you should definately be informed if that service
> goes away. If you are not getting the removedService called then please
> open a bug report against Equinox->Framework and attach a testcase we
> can use to reproduce.
>
> Thanks.
>
> Tom.
>
> Marco Lehmann wrote:
>> Hi folks,
>>
>> I have found a strange behaviour in using the ServiceTracker.
>> I have two plugins A & B (I have more in my RCP application, but this
>> doesn't matter). Plugin A registers a service in its Activator. Plugin B
>> creates a ServiceTracker (in a view). First I start plugin B. When I now
>> start plugin A, plugin B finds the service registered by plugin A. That
>> is all expected and working behaviour, but when I now stop plugin A,
>> then the service is released (tracing org.eclipse.osgi), but the service
>> tracker in plugin B was not informed.
>>
>> I think the service tracker should be informed?!
>>
>> TIA
>> Marco
>>
>>
>> PS: Eclipse 3.1.2
|
|
|
Powered by
FUDForum. Page generated in 0.03250 seconds