--- 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