Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Gemini » Combine Gemini Web and OSGi services
Combine Gemini Web and OSGi services [message #641204] Wed, 24 November 2010 14:44 Go to next message
Violeta Georgieva is currently offline Violeta GeorgievaFriend
Messages: 278
Registered: October 2010
Senior Member
Hello,

I have a web application bundle.
I know from the OSGi Enterprise specification that I can get the BundleContext from the ServletContext and then I can retrieve an OSGi service.
I'm wondering is it possible to use the resource injection mechanism from the Servlet specification i.e. can I declare the OSGi service as a resource in the servlet and whether this resource can be injected automatically when the servlet is initialized?

Thanks in advance
Regards
Violeta
Re: Combine Gemini Web and OSGi services [message #641225 is a reply to message #641204] Wed, 24 November 2010 15:24 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
I don't think that will work as I don't think there's any code which will look up the relevant services and inject them. That's not to say that such code could not be added. Wink

You may like to post this question on the OSGi Enterprise Expert Group mailing list and/or propose this as an enhancement to the Web Applications spec.

An alternative way of avoiding programmatic service lookups is to use Spring DM to inject a service into a bean and then inject that into the web application using Spring dependency injection, probably also necessitating the use of the Spring dispatcher servlet. But that's probably not the answer you were looking for.
Re: Combine Gemini Web and OSGi services [message #647805 is a reply to message #641225] Sun, 09 January 2011 12:50 Go to previous message
Werner Keil is currently offline Werner KeilFriend
Messages: 1087
Registered: July 2009
Senior Member
@Web Applications Spec, please propose any of that to relevant Java EE JSRs.
Addressing it to the 316 Spec Lead may be best, as he's likely to lead EE 7.

I'd be extremely curious to learn, if Oracle, also co-leading Gemini plans
to have built-in Gemini support for Java EE 7 or if that's again going to be
a tedious process here in this Eclipse project ?;-)

For EE 7 if it's based simply on what SE 7 promises so far, I'm afraid, many
of these OSGi/EE troubles will persist. Unless EE 7 was to build
consequently on SE8 or at least the (still in the works and no number
assigned) Modularization JSR, I'm afraid this situation will be as
schizophrenic as it used to be between Java and OSGi for a bit too long
now...

"Glyn Normington" <gnormington@vmware.com> schrieb im Newsbeitrag
news:icjafl$r6t$1@news.eclipse.org...
>I don't think that will work as I don't think there's any code which will
>look up the relevant services and inject them. That's not to say that such
>code could not be added. ;)
>
> You may like to post this question on the OSGi Enterprise Expert Group
> mailing list and/or propose this as an enhancement to the Web Applications
> spec.
>
> An alternative way of avoiding programmatic service lookups is to use
> Spring DM to inject a service into a bean and then inject that into the
> web application using Spring dependency injection, probably also
> necessitating the use of the Spring dispatcher servlet. But that's
> probably not the answer you were looking for.
Previous Topic:Licensing
Next Topic:Blueprint Spring support
Goto Forum:
  


Current Time: Fri Apr 19 20:18:30 GMT 2024

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

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

Back to the top