[ 
https://issues.apache.org/jira/browse/WW-3473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13028228#comment-13028228
 ] 

Rene Gielen commented on WW-3473:
---------------------------------

This issue messes up two JSRs, I guess:
- CDI, which is JSR299
- DI for Java SE (@Inject), which is JSR330

For JSR330, there cannot be a _direct_ support in a framework like Struts 2, 
since it only defines standard annotations for dependency injection. JSR299 
defines a container and integration points, which is what we need offer Struts 
2 integration.

To use JSR330 in Struts 2, one would need to work with a dependency injection 
container that is capable of handling JSR330 injections, that is
- Spring - current Spring plugin should enable you to use @Inject
- Guice 3 - current Guice both has @Inject and Struts 2 support, see 
http://code.google.com/p/google-guice/wiki/Struts2Integration
- CDI - we are currently working on a CDI plugin (already in sandbox) that 
offers integration for JSR299 containers such as Weld, which per definition has 
to support @Inject

So if I understand you right, you would want to use both JSR299 and JSR330, 
which is addressed by the CDI plugin currently under development, see
http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-cdi-plugin


> JSR 330, javax.inject implementation in Struts2
> -----------------------------------------------
>
>                 Key: WW-3473
>                 URL: https://issues.apache.org/jira/browse/WW-3473
>             Project: Struts 2
>          Issue Type: Improvement
>            Reporter: Frans Thamura
>
> There is Java CDI, and to become the most open platform, I think Struts2 will 
> become more cool if have option to implement IoC using JSR 330
> reference code can use this.
> http://code.google.com/p/atinject/

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to