Hi Rohit;

I did it for Apache Tomcat integration for injecting CDI Beans into 
Servlets/Filters/Tag Libraries. I use OWBInjector class. You could look at 
org.apache.webbeans.web.tomcat.TomcatInstanceListener, TomcatAnnotProcessor in 
tomcat6 module.

OWBInjector is a generic class not related with EJB. It takes Java EE 
components instance and inject CDI beans into it.

Thanks;

--Gurkan




________________________________
From: Rohit Kelapure <[email protected]>
To: [email protected]
Sent: Tue, April 13, 2010 7:49:53 PM
Subject: Re: EE-Integration Question: How does one do CDI injection on Java EE  
component classes ?

Gurkan,

This will work with EJBs.  How does a container provide injection of
CDI beans into other EE types say JAX-WS Web Services or HTTPServlets
?

Does OpenWebBeans expose an extension point for EE containers to
plugin their own injection service  for injection of CDI managed beans
into EE types.
The mirror image of ResourceInjectionService ?

--Thanks,
Rohit Kelapure


On Mon, Apr 12, 2010 at 10:25 AM, Gurkan Erdogdu
<[email protected]> wrote:
> Hello Rohit;
>
> Could you look at the OWBInjector utility class? This is responsible for
> injecting into EE components instances.
>
> When EE container destroys EE component, you will also destroy creational
> contexts via OWBInjector.
>
> OWBInjector injector = new OWBInjector();
> injector.inject(instance, creational);
> injector.release(); //on ee component destroying
>
> For EJB case, I have updated OpenWebBeansEJBInterceptor. Please look at it.
> Basically, you will add it to every EJB Beans that is contained in JSR299
> module.
>
> Thanks;
>
> --Gurkan
>
> 2010/4/12 Rohit Kelapure <[email protected]>
>
>> Team,
>>
>> OpenWebBeans provides the ResourceInjectionService API  for injection
>> of Java EE injectable resources into CDI managed beans.  This works
>> well and we have integrated the ResourceInjectionService API in our EE
>> container.
>>
>> We need guidance on how OWB handles CDI managed bean injection  into
>> EE components.
>>
>> Are we to follow the WELD approach of achieving this through the CDI
>> defined InjectionTarget SPI. Should an EE container extend/compose the
>> BeanManager and expose a fireProcessInjectionTarget(Class) utility
>> method ? How does this integrate with the OpenWebBeansEjbPlugin. ?
>>
>> I am looking for a high level overview of how this will work in OWB
>> and the code that currently supports this feature and what is yet to
>> be written ?
>>
>> --Thanks,
>> Rohit Kelapure
>>
>
>
>
> --
> Gurkan Erdogdu
> http://gurkanerdogdu.blogspot.com
>



      ___________________________________________________________________
Yahoo! Türkiye açıldı!  http://yahoo.com.tr
İnternet üzerindeki en iyi içeriği Yahoo! Türkiye sizlere sunuyor!

Reply via email to