I've put my initial works on a Struts2 CDI plugin into the sandbox. It implements a JEE6 compliant ObjectFactory, making Actions etc. being wired up by the EE container, with all the good stuff like scoped managed beans, EJBs and such.

The plugin is built against current S2 trunk (2.2.0-SNAPSHOT). It uses JBoss Weld (the JSR299 RI) for building and testing, as well as an early version of Weld-SE for testing. The latter dependency is not yet in a maven repository, but the build process will bootstrap it from subversion when the bootstrap profile is enabled:
mvn -Pbootstrap install
Please note that the bootstrap build of Weld-SE enforces use of Maven 2.0.10 - don't ask me why ... ;)

I've also put together the inevitable NumberGuess example as a S2 implementation, using and demonstrating the CDI-plugin. It works nicely against Glassfish V3 full profile preview, JBoss should work as well.

I've got some further ideas for transaction management helper interceptor, as well as some thoughts on how a @PreDestroy lifecycle method might be supported in Actions. I also plan to add some useful documentation to the wiki.

Any feedback highly appreciated, have fun with it :)

Plugin:
https://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2-cdi-plugin/
Example:
https://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2-cdi-example/

Regards,
- Rene

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org

Reply via email to