JSR 299 and 330 progress in latest GlassFish v3
[URL="http://weblogs.java.net/blog/rogerk/archive/2009/09/04/contexts-and-dependency-injection-jsr-299-and-glassfish"] [IMG]http://blogs.sun.com/theaquarium/resource/GameDemoRogerK.png[/IMG][/URL]As previously reported last month, [URL="http://blogs.sun.com/theaquarium/entry/javaee_6_will_include_jsr330"]JavaEE 6 will include JSR330 and JSR299[/URL]. Roger Kitain already has a simple yet [URL="http://weblogs.java.net/blog/rogerk/archive/2009/09/04/contexts-and-dependency-injection-jsr-299-and-glassfish"]detailed blog entry[/URL] on using JCDI (JSR 299, ex-WebBeans) in GlassFish. He walks through JSF 2.0 and JSR 299/JSR 330 code. You'll see there @Inject, @Qualifier, @SessionScoped, @ApplicationScoped, all in action.
If you're curious enough to test this sample, I would recommend using [URL="http://www.netbeans.org/community/releases/68/"]NetBeans 6.8 M1[/URL] - register a recent GlassFish v3 build ([URL="http://download.java.net/glassfish/v3/promoted/glassfish-v3-web-preview-b62.zip"]promoted build web 62[/URL] for instance), create a Web Application with Java EE 6 as the platform level and copy paste the various pieces. No further settings are required.
Overall, this shows progress since Cay's [URL="http://weblogs.java.net/blog/2009/07/05/webbeans-glassfish-v3"]previous entry on the topic[/URL]. Other posts on similar topics are marked with the [URL="http://blogs.sun.com/theaquarium/tags/jsr330"]"jsr299" [IMG]http://blogs.sun.com/theaquarium/resource/MagnifyingGlass-12_12px.jpg[/IMG][/URL] and <a href="http://blogs.sun.com/theaquarium/tags/jsr330">"jsr330"