|
Re: Race problem in Java App and OSGI bundles start. [message #90254 is a reply to message #90207] |
Tue, 12 June 2007 08:00 |
Eclipse User |
|
|
|
Originally posted by: alex_blewitt.yahoo.com
The thing with dynamic systems is that you need to expect them to be dynamic :-)
If you have two bundles A and B, and it's important that A starts before B starts, you've got two possibilities:
1) Communicate via the service registry, so that A registers a service and B looks out for a service via a ServiceTracker/registry event listener. That way, A can come and go and B will still notice.
2) Set up the osgi.bundles property to start B at a higher start level than A, so something like:
osgi.bundles=A@2:start,B@3:start
That will ensure that A is started at level 2, and B is started at level 3. IIRC Eclipse usually goes up to level 5 or 6 when it starts, but there's no reason this number couldn't be bigger, and there's probably a system property that configures it (though I don't know what that is off the top of my head).
Alex.
|
|
|
|
|
|
|
Re: Race problem in Java App and OSGI bundles start. [message #93189 is a reply to message #90207] |
Fri, 27 July 2007 13:31 |
Eclipse User |
|
|
|
Originally posted by: diemarmeladenesserin.yahoo.de
Dear Cathy,
it seems that you know how to use EclipseStarter. Perhaps can you help me? I try to use an Eclipse RCP Project, but I cannot invoke it with the Launcher, but I need to invoke it from another Java-Class. I tried to test it with "EclipseStarter.startup(a, null);" but I don't know which Arguments I should use. I defined "String[] a = {"-application <application>", "-product nameOfTheProject.product -data"}" but when I start, nothing happens, even no error. I look forward to your answer.
(Sorry for my bad english, I'm not from USA or England)
Greetings,
R.K.
|
|
|
|
|
|
|
Synchronizing with OSGi SCR Work Queue Thread [message #97603 is a reply to message #94719] |
Wed, 19 September 2007 09:18 |
Missing name Mising name Messages: 18 Registered: July 2009 |
Junior Member |
|
|
Hi,
i have an RCP application that has a service component using Declarative Services. The service component of the RCP app references a service, say X. On clicking a particular button, i would like to invoke service X. Currently, on clicking the button, the binding/activation done by the SCR Work Queue is happening in a separate thread. Thus, my application goes on and tries to use the service X before the app service component has finished binding to X.
My question is: Is there any way declaratively to synchronize or wait for the binding to complete before proceeding with using the thread. Code mechanisms like sleep() definitely work, but i was wondering if there is some way of achieving this without writing code. Alternatively, what is the "blessed" or prescribed method of achieving it? i have gone through the discussion at the following thread:
http://www.eclipsezone.com/eclipse/forums/m92165828.html#921 65828
however, i could not gather much on whether this situation can be resolved without explicitly writing some sort of synch code. i would not like to start X at start-up, since there will be many such "Xs" in future, thus impacting memory footprint. Lazy loading is preferred as far as possible.
Any pointers will be greatly appreciated.
TIA,
Kind Regards,
-abhi
|
|
|
Powered by
FUDForum. Page generated in 0.04279 seconds