Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Blueprint Cyclic Dependency
Blueprint Cyclic Dependency [message #986954] Thu, 22 November 2012 14:13 Go to next message
Johan Eriksson is currently offline Johan ErikssonFriend
Messages: 19
Registered: May 2012
Junior Member
I have a case where I have two services that each depend on one another - e.g.

Service A depends on Service B
Service B depends on Service A

I understand from reading the OSGi specification (section 121.2.6 Cyclic Dependencies that this can be resolved making sure there is a "breaking" member - i.e. one of the services has the other as a property (and not a constructor argument). Both Service-beans also need to be declared as singletons (doing that too).

However, even when setting it up this way I still see the container waiting for the dependency on the other service to get satisfied and eventually timing out.

Is this a known issue or am could I be doing something wrong here ?

I'm using Virgo 3.5.0 Final.

Thanks,

/Johan/
Re: Blueprint Cyclic Dependency [message #989051 is a reply to message #986954] Tue, 04 December 2012 12:57 Go to previous messageGo to next message
Johan Eriksson is currently offline Johan ErikssonFriend
Messages: 19
Registered: May 2012
Junior Member
Bumping this thread. Close to a thousand views and no responses ? Glyn ?
Re: Blueprint Cyclic Dependency [message #989705 is a reply to message #989051] Fri, 07 December 2012 11:18 Go to previous message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
That's a known limitation in Blueprint - see section 121.3 of the spec which shows that all the (mandatory) service dependencies of a given bundle are waited for before any services are published by the bundle. I suspect 121.2.6 is talking about cyclic dependencies within a bundle rather than between bundles.

I wonder if you could break the cycle by making one of the service references optional or using a set which could initially be empty? I haven't much experience of this, but it might give you a direction to explore.
Previous Topic:Table LISTING not found in greenpages example
Next Topic:Spring Annotation Driven Controller in different bundles
Goto Forum:
  


Current Time: Fri Apr 19 05:01:57 GMT 2024

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

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

Back to the top