users@glassfish.java.net

Re: JAX-RS on Glassfish 3.1: _at_EJB injection?

From: <glassfish_at_javadesktop.org>
Date: Tue, 15 Jun 2010 07:22:16 PDT

> It is spec compliant. But we still have some work to
> do to honor some
> optional requirements.

OK. So the essential gist is that a resource class needs to be a managed bean (either in the @ManagedBean sense or the CDI sense). Obviously, unannotated, a resource class [i]is[/i] a CDI managed bean, but you're saying that the Java EE 6 specification, somewhere, says that a resource class must be explicitly marked as a managed bean, owing to, among other things, the lateness of the inclusion of CDI into the Java EE specification.

Is that all correct?

My takeaway: as long as I'm not using constructor injection--which I'm not--then simply marking my resource class as @RequestScoped or @ManagedBean will enable further injections to take place properly.

Right?

Thanks again,
Laird
[Message sent by forum member 'ljnelson']

http://forums.java.net/jive/thread.jspa?messageID=474344