Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] When is DS done loading services?

Hi Otto,
I guess your problem is connected to the asynchronous processing of the DS services. As far as I understand the situation is: your application bundles are started, then your application is started but at this moment not all of the DS services are inited yet because they are being asynchronously processed.

Unfortunately currently there is no way to find out when DS completes the DS services processing. I think if there was an option that DS bundle process the DS services in the started bundles synchronously, it would solve your problem. So I will open bug(enhancement) about that and hopefully this will be implemented soon. As a possible workaround you could observe the running threads and when the thread with name "Component Resolve Thread" disappears this would mean that DS bundle has no more work to do and eventually all of your DS services are processed. I realize this is not a clean solution (that's why I call it workaround) but at this moment I cannot find out a more appropriate working solution without modifications in the DS bundle.

Stoyan


Cortez, Otto wrote:
I made a post to the Eclipse newcomers group a few weeks ago, but did not get a response. I don’t know if this is the appropriate place for this question, but hopefully someone can point me in the right direction.

We are building a headless RCP application and we would like to use DS to make functionality available. The problem we are running into is that not all of the services we declared through DS get loaded and are visible before our application executes.

For example, I have a service A which needs 0..n instances of another service B. The issue I'm running into is that if the implementations of service B are spread across several bundles, then the service A will not have seen all instances of service B when it is called since the application starts (and sometimes ends) running before DS is done looking through all the bundles and registering all the services in the active bundles.

Is there a way to know when declarative services is done looking through the active bundles and loading the services found in them? Am I missing something?

It seems that using the plug-in registry may solve this issue. Is that perhaps a better way to go?

Thanks,
Otto

This email and any files transmitted with it are confidential, proprietary
and intended solely for the individual or entity to whom they are addressed.
If you have received this email in error please delete it immediately.




------------------------------------------------------------------------

_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev

--
---------------------------------------------------------
dipl. eng. Stoyan Boshev . Department manager
ProSyst Labs EOOD
1606 Sofia, Bulgaria . 48 Vladajska Str.
Tel. +359 2 953 05 88; Fax +359 2 953 26 17
Mobile: +359 88 898 29 17
http://www.prosyst.com . s.boshev@xxxxxxxxxxx
---------------------------------------------------------
stay in touch with your product
---------------------------------------------------------


Back to the top