+1
I think there are a couple of other issues that need to be looked at as
well.
1) When does the Web Beans lifecycle manager actually get turned on? In
other words, how do you know you're in a Web Beans aware container?
Perhaps it's something we assume first and try to grab an instance from a
bean manager. Or, we look for a beans.xml as we're starting up and make
the toggle that way. I dunno, but it's something to keep in mind.
2) Have a flag to turn it off. Moving from something like Wink and Tomcat
to Wink and Geronimo, users should be able to run Wink in a Web Beans aware
container the same way they did outside. I know, this is kind of a nit
pick.
Also, rather than lumping it out separately, we could create a whole Java
EE extension module to the base Wink distribution. So, you could download
Wink base or could grab Wink EE that would have the Web Beans integration
and the Servlet 3.0 integration that also needs to happen. That also gives
Geronimo one package to grab when we start the integration there.
Bryant Luk
<bryant....@gmail
.com> To
[email protected]
05/28/2010 07:04 cc
AM
Subject
JSR-299 / Web Beans / JCDI Support
Please respond to
wink-...@incubato
r.apache.org
Hi,
I opened issue WINK-287 to add in the support for JSR-299. If anyone
has any thoughts on what you want to happen here, then please reply.
I think the issue will be like the Guice server module. 3 things I
think would need to happen:
1) Determine if the bean is a web bean (which I think pretty much
every thing is minus the optional support conditions in JAX-RS 1.1
spec).
2) Get a reference to the web bean from the underlying OpenWebBeans
container. This may involve adding a callback to let the container
know it's ok to clean up somewhere in the handler chains.
3) Add our injections (@Context, @*Param, etc.) to the web bean
container for JAX-RS beans.
I think the web bean spec SPI should be good enough to do all of the
above and I am hoping we won't have to do anything proprietary.
I posted a few questions to the OpenWebBeans user list which they answered:
http://mail-archives.apache.org/mod_mbox/openwebbeans-user/201005.mbox/%[email protected]%3e
What I think users will gain:
+ In supporting JSR-299 containers, support for Java EE injections
+ JSR-330 @Inject support
+ JSR-299 Interceptors, decorators, events, etc.
+ @PostConstruct / @PreDestroy support
+ One of the last known pieces for JAX-RS 1.1 support in a Java EE 6
container
I also propose leaving this as an optional requirement (i.e. don't
require JSR-299 into the main wink-server/wink-common) since I think
users won't necessarily have a Java EE 6 environment.
Thoughts, questions, suggestions?