Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Gemini » Custom scope support in blueprint
Custom scope support in blueprint [message #674149] Wed, 25 May 2011 23:36 Go to next message
Brian  is currently offline Brian Friend
Messages: 2
Registered: May 2011
Junior Member
Hi, I am currently working on a project that requires the use of a custom scope in blueprint as specified in the attached blueprint XML document. I managed to get this working on Apache Aries by providing an org.apache.aries.blueprint.NamespaceHandler, via the OSGi service registry, to any blueprint container that needs to process that particular namespace. I am now hoping that I can get this working on Eclipse Gemini as well, in a similar manner if possible. I am hoping to be able to provide my own implementation of an org.springframework.beans.factory.xml.NamespaceHandler, once again via the service registry, that would be called to register my custom scope. Is this a feasible approach? If not, then how can I support my blueprint custom scope in Gemini?
Re: Custom scope support in blueprint [message #681824 is a reply to message #674149] Thu, 09 June 2011 22:53 Go to previous messageGo to next message
Costin Leau is currently offline Costin LeauFriend
Messages: 45
Registered: February 2010
Member
Rather then implementing a custom namespace handler you can just use the custom scope functionality available in Spring out of the box. You can mix Spring and Blueprint definitions in the same file and Gemini Blueprint will support this.
Re: Custom scope support in blueprint [message #682515 is a reply to message #681824] Sat, 11 June 2011 10:18 Go to previous message
Brian  is currently offline Brian Friend
Messages: 2
Registered: May 2011
Junior Member
Hi Costin,

Thanks for the response. The requirement for my project is to use blueprint exclusively, and I am able to do this when using Gemini, but only with a work around. I have an implementation of a BeanDefinitionDecorator in which I perform all of the Spring-specific configuration for a custom scope. This works fine, except that there is currently no mechanism to allow me to register it so that it gets called when a custom scope, with the correct namespace, is used.

My work around is to always use a dummy custom attribute along with the custom scope on the bean definition. This allows my BeanDefinitionDecorator to be called in order to drive the configuration of the custom scope. IMO I should not need to use this work around, especially as what I am trying to do is well within the confines of the Blueprint specification. I have therefore raised a bug, 348776, against Gemini to address this issue.
Previous Topic:Using Blueprint way to Add Extension points
Next Topic:Gemini Maven repository
Goto Forum:
  


Current Time: Sat Apr 27 05:14:27 GMT 2024

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

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

Back to the top