users@jersey.java.net

Re: [Jersey] Resource injection

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Fri, 05 Jun 2009 12:20:00 -0700

Hi George,

It is not ready yet. Basically i am waiting for JSR-299 and managed
beans support in Glassfish v3 (since i do not want to re-implement
stuff).

You can if you wish utilize GuiceyFruit:

   http://code.google.com/p/guiceyfruit/

and the Jersey Guice support to get support for @EJB etc.

Paul.

On Jun 5, 2009, at 9:52 AM, Turner, George wrote:

> I am just asking whether normal EJB 3.0 resource injection is
> available yet on a Jersey service class? Everything I read looks
> like all RI is through method parameters, and I would really like to
> just put a
>
> @Resource(name = "jdbc/dataSource")
> private DataSource dataSource;
>
> or a
>
> @EJB
> private AuditDataService auditSvc;
>
> or even a
>
> @WebServiceRef
> private ValidationService validationService;
>
> But I have not found ANY ability to do this yet. I think I read
> somewhere that this was coming by making these classes to be able to
> be recognized by the container as managed classes, but looking
> through the 1.1.0-ea still looks like it isn’t there yet. Am I
> missing something????
>
> Thanks
>
> Gene