I pinged this across to Paul Sandoz, he says
The JAX-RS root resource class needs to be annotated with @ManagedBean or a scope-based annotation like @RequestScoped.
It is necessary to opt in because CDI changes the contract thus potentially producing errors for existing JAX-RS root resource or provider classes.
Pete Muir wrote on Jan 22, 2010 00:32:
I pinged this across to Paul Sandoz, he saysThe JAX-RS root resource class needs to be annotated with @ManagedBean or a scope-based annotation like @RequestScoped.
It is necessary to opt in because CDI changes the contract thus potentially producing errors for existing JAX-RS root resource or provider classes.
Ugh, that's suboptimal :-(
It's also not at all clear from the specs that this is the expected behavior.
Paul and I have been discussing some other options on this - I'll keep people updated if he makes some progress.