Synchronizing with OSGi SCR Work Queue Thread [message #97619] |
Wed, 19 September 2007 09:50 |
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.03371 seconds