users@jersey.java.net

Re: [Jersey] Inject EJB into resource class

From: Zach Cox <zcox522_at_gmail.com>
Date: Thu, 27 Aug 2009 10:20:24 -0400

Hi Paul,

> 2) Make PicturesResource a stateless or singleton bean and resource. You
> need to use a version of GlassFish that is equal to or greater than preview.

I really like this approach: by adding JAX-RS annotations to a
stateless session bean you end up being able to reuse your business
logic by 1) injecting that bean into other things like a JSF managed
bean, and 2) exposing it as a RESTful web service.

I'm using the latest GlassFish Tools Bundle for Eclipse v1.1 that
includes a bundled GlassFish v3 Prelude, and everything seems to be
working fine. Is there something specifically in GlassFish v3 Preview
I should be aware of, that's not in Prelude?

Thanks,
Zach