users@jersey.java.net

Re: [Jersey] Appeal to jersey developers for better+reliable javax.inject/cdi/weld support

From: Morten <mortench2004_at_yahoo.dk>
Date: Fri, 23 Apr 2010 09:40:53 +0000 (GMT)

--- Den tors 22/4/10 skrev Paul Sandoz <Paul.Sandoz_at_Sun.COM>: > Because enabling CDI changes the programming model. It > means that adding a beans.xml may result in deployment > failure for existing JAX-RS code. So i took the conservative > approach of "keep on trucking" and your resource classes > will behave in exactly the same way unless you explicitly > declare otherwise. Ok. I can see you made the right choice to support existing code bases. But for new CDI projects, it complicate things and does not feel "natural". Maybe we should have a setting in web.xml "disable_jerseys_own_legacy_dependency_management=true" (note a tiny bit of personal bias in naming :-)) > The point about what i wrote above is it may not be totally > possible because CDI may not always be configured (no > beans.xml) and @ManagedBean is required to be supported by > JAX-RS in EE 6. I would actually propose to change Jesey to REQUIRE an external javax.inject or CDI capable implementation to work. So that a jersey project would not even compile unless weld, spring guice or something else is installed. Then this point would go away. /Cheers, Morten