Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Spring Configurable across multitple bundles
Spring Configurable across multitple bundles [message #881261] Mon, 04 June 2012 08:43 Go to next message
Carlos Salinas is currently offline Carlos Salinas
Messages: 32
Registered: March 2011
Location: Avd. de la Argentina 132,...
Member
Hello community,

I am in a nightmare trying to using Configuble object inside multiples bundle, i am not sure after mani intentsif Virgo already supports this functionality, because i found these tickets:

https://issuetracker.springsource.com/browse/DMS-2490?page=com.atlassian.streams.streams-jira-plugin:activity-stream-issue-tab#issue-tabs

https://jira.springsource.org/browse/SPR-5156


Are they resolved? And if is Yes the answer, how can i configure virgo to commit it?

Thanks
Re: Spring Configurable across multitple bundles [message #882311 is a reply to message #881261] Wed, 06 June 2012 08:26 Go to previous messageGo to next message
Carlos Salinas is currently offline Carlos Salinas
Messages: 32
Registered: March 2011
Location: Avd. de la Argentina 132,...
Member
I tested the problem having two bundles. The first one is a Web bundle that consumes a service registered by the second jar bundle.

When the web bundle invokes a method in the service api, this invokation produces the creation of @Configurable objects in the method's implementation, having this annotated objects spring dependencies to be injected by IoC. BUT the creation ALWAYS produces an Spring exception, because the Jar Bundle's ApplicationContext cannot find those bean definitions.


BUT IF i put the bean definitions in Web Bundle Spring descriptors, needed to create those Configurable Objects inside the Jar Bundle. Then they are injected.



My doubt is: How Can an @Configurable Object look up its bean dependecies in another ApplicationContext diferent than it belongs to?


Thanks u.
Re: Spring Configurable across multitple bundles [message #882898 is a reply to message #882311] Thu, 07 June 2012 12:36 Go to previous message
Frieder Heugel is currently offline Frieder Heugel
Messages: 61
Registered: October 2010
Location: Basel, CH
Member
Hi all

I might be wrong but isn't the new weaving hook [1] able to add package imports to a bundle?

Regards
Frieder

[1] http://www.slideshare.net/mfrancis/bytecode-weaving-in-osgi-enhance-your-classes-not-your-dependency-graph-tim-ward
Previous Topic:Virgo Tooling M4 Released
Next Topic:OSGi case study
Goto Forum:
  


Current Time: Sat Nov 01 12:02:39 GMT 2014

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

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