users@jersey.java.net

SV: [Jersey] Weld on SE with Jersey and Grizzly

From: Morten <mortench2004_at_yahoo.dk>
Date: Tue, 27 Apr 2010 16:54:43 +0000 (GMT)

Hi Poul, Thanks a lot! I really value this example and the help!!!!! To have Jersey now work with the latest java dependency injection standard CDI on both JEE and SE is a major achievement! It f.x. allows for complex REST apps build using standard Java 6 javax.inject, that can be run as both lightweight desktop applications and full web application in an application server. Way cool. I do not think that any other of the competing implementations can match this ! Now - pending my own test of your example and the recent bugfix - the only possible real potential obstacle for me about Jersey/CDI integration will be if the upcoming OSGI version of Jersey will continue to work with CDI/weld in both JEE and SE ??? Is this something you can check for me Poul in advance (very important as I will properly move to OSGI with my application and possible run Jersey on top of OSGI Http Service which I think will be a popular way to run Jersey) ? I will get back to you about my possible need for a public version of JCDIComponentProviderFactory. But maybe other people can say if they need it as well ? Again - THANKS A LOT!! Cheers, Morten Christensen --- Den tirs 27/4/10 skrev Paul Sandoz <Paul.Sandoz_at_Sun.COM>: > Fra: Paul Sandoz <Paul.Sandoz_at_Sun.COM> > Emne: [Jersey] Weld on SE with Jersey and Grizzly > Til: "Jersey-Users Mailing List" <users_at_jersey.dev.java.net> > Cc: "Morten" <mortench2004_at_yahoo.dk> > Dato: tirsdag 27. april 2010 17.21 > Hi Morten, > > Attached is a basic example of using Weld on SE with Jersey > and Grizzly. > > I think you were perhaps running into issues with > dependences. Note that JCDIComponentProviderFactory is not > currently not part of the public API. It has a dependency on > the java EE annotations API. If we want to make > JCDIComponentProviderFactory public we can split the class > up to be CDI and CDI+EE dependent. > > What the example does not support @RequestScoped. To do > that requires some additional declaration in Grizzly to > declare a weld-based context so it can manage the > request-scoped classes when a request starts and finishes. > > I am assuming for the Grizzly Web-based support this should > be relatively straight forward e.g. a servlet context > listener declaration. However, for the low-level Grizzly > support this will require some specific Grizzly/Weld > integration. > > Paul. > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net > For additional commands, e-mail: users-help_at_jersey.dev.java.net