Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Synchronizing with OSGi SCR Work Queue Thread
Synchronizing with OSGi SCR Work Queue Thread [message #97619] Wed, 19 September 2007 09:50
Missing name Mising name is currently offline Missing name Mising nameFriend
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
Previous Topic:Race problem in Java App and OSGI bundles start.
Next Topic:NullPointerException in launcher.WebStartMain.findBundle()
Goto Forum:
  


Current Time: Sat Apr 20 13:00:14 GMT 2024

Powered by FUDForum. Page generated in 0.02810 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top