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?

Interesting problem Otto.  Normally the response would be "your app should just observe the services coming and going and react accordingly".  However, in your case the interesting twist is that the app appears to be short lived.  So as you say, while DS is poking around doing stuff, your app is busily executing.  You might get some joy out of using the start levels. For example, put your application bundle at a higher start level than all the other bundles.  This way they are all started prior to your app starting.  NOTE that this will NOT guarantee the behaviour you are looking for, just likely improve the situation.

Fundamentally DS is never "done" since bundles can come and go any time.

Jeff

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

Back to the top