Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » How do you set dependencies on services?
How do you set dependencies on services? [message #58734] Fri, 27 January 2006 20:23 Go to next message
Eclipse UserFriend
Originally posted by: ronaldbaldwin.gmail.com

Is there a way to set service dependencies on a bundle?

For example, I have a bundle that uses various OSGi services like Http and Log. How do I configure the bundle so it doesn't get started until the services exist and gets stopped when they go away?

It looks like the Start Level service could get the job done, but that seems like a pretty error-prone manual process and requires you to know/change configuration for bundles other than your own. Another option would be to set a service listener to watch for the services you need and manually track your own dependencies, but I'm thinking there has to be a more straight-forward way of solving this.

Any ideas?
Re: How do you set dependencies on services? [message #58757 is a reply to message #58734] Fri, 27 January 2006 20:29 Go to previous messageGo to next message
Richard Backhouse is currently offline Richard BackhouseFriend
Messages: 19
Registered: July 2009
Junior Member
Have you looked at Declarative Services ? They should pretty much meet
your needs

Ron Baldwin wrote:
> Is there a way to set service dependencies on a bundle?
>
> For example, I have a bundle that uses various OSGi services like Http and Log. How do I configure the bundle so it doesn't get started until the services exist and gets stopped when they go away?
>
> It looks like the Start Level service could get the job done, but that seems like a pretty error-prone manual process and requires you to know/change configuration for bundles other than your own. Another option would be to set a service listener to watch for the services you need and manually track your own dependencies, but I'm thinking there has to be a more straight-forward way of solving this.
>
> Any ideas?
Re: How do you set dependencies on services? [message #58854 is a reply to message #58734] Mon, 30 January 2006 11:50 Go to previous messageGo to next message
Ricky is currently offline RickyFriend
Messages: 204
Registered: July 2009
Senior Member
You can use the Service Binder which is the ancestor of declarative
services

http://gravity.sourceforge.net/servicebinder/

But maybe this project is not maintained anymore.

Ricky
Re: How do you set dependencies on services? [message #59583 is a reply to message #58757] Fri, 03 February 2006 00:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ronaldbaldwin.gmail.com

You know, I had looked at Declarative Services at one point then completely forgot about it when I was trying to figure this out. Thanks for the pointer!
Re: How do you set dependencies on services? [message #59606 is a reply to message #58854] Fri, 03 February 2006 00:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ronaldbaldwin.gmail.com

Yeah, it doesn't look like it's been touched in a while. Fortunately, I think I've got a decent handle on Declarative Services so I don't think it'll be necessary. Thanks for the pointer though!
Re: How do you set dependencies on services? [message #59849 is a reply to message #59606] Mon, 06 February 2006 18:11 Go to previous message
Andreas Ronge is currently offline Andreas RongeFriend
Messages: 4
Registered: July 2009
Junior Member
Ron Baldwin skrev:
> Yeah, it doesn't look like it's been touched in a while. Fortunately, I think I've got a decent handle on Declarative Services so I don't think it'll be necessary. Thanks for the pointer though!

We are using xenotron's dependency manager for handling dependencies
between services. It also handles configuration of sevices.
The great thing with it is that that you do not need any XML, instead
you declare dependencies in plain java !

http://wiki.ops4j.org/dokuwiki/doku.php?id=pax:xenotron
(it will soon be available in the apache felix project)

/andreas
Previous Topic:Thoughts about servlets, resources, httpcontexts extension points
Next Topic:How should one use a ServletContextListener when running under serverside OSGI?
Goto Forum:
  


Current Time: Sun Jul 07 11:16:50 GMT 2024

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

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

Back to the top