geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Bohn <joe.b...@earthlink.net>
Subject Re: Injection of Bundle/BundleContext into Java EE components
Date Thu, 21 Oct 2010 21:11:40 GMT
Yay!

Joe

On 10/21/10 5:06 PM, Jarek Gawor wrote:
> Hi all,
>
> I was thinking about adding support for injection of
> Bundle/BundleContext objects into Java EE components via @Resource
> annotation. Example:
>
> class MyServlet extends HttpServlet {
>     @Resource
>     Bundle bundle;
>     @Resource
>     BundleContext bundleContext;
>     ....
> }
>
> That should make it easier to interact with OSGi within Java EE apps.
>
> I was also thinking of something similar with @Inject for web beans
> (cdi stuff) but I'm not really sure it's all that useful since it
> should be possible to inject Bundle/BundleContext via @Resource or
> combine it with @Produces.
>
> What do you think?
>
> Jarek
>


Mime
View raw message