users@jersey.java.net

[Jersey] Re: Fwd: Fwd: jersey-guice and _at_javax.inject.Inject

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Thu, 21 Apr 2011 16:06:42 +0200

On 04/21/2011 10:20 AM, Stephen Friedrich wrote:
> Thanks, works great!
>
> Just maybe one could load the @javax.inject.Inject class using reflection? That way it would be possible to use Guice 2
> without
> adding the otherwise unnecessary jar with standard annotations.

The issue is that Guice 2 does not have support for JSR330. So I think it's better to keep the Guice integration updated
to the latest version. You can still use older Jersey if you want to use old Guice.

Marek

>
> On 20.04.2011 22:50, Marek Potociar wrote:
>> Hi Stephen,
>> first of all, sorry for a delayed response.
>>
>> Couple of weeks ago I have implemented a patch in the jersey-guice integration adds support for Guice3, including the
>> JSR330 @Inject annotation. This patch will be part of the upcomming Jerse 1.7 release in a month or so. Right now you
>> can try it if you download a snapshot version of Jersey or the latest promoted early access version 1.7-ea03
>>
>> HTH,
>> Marek
>>
>>
>> -------- Original Message --------
>> Subject: [Jersey] jersey-guice and @javax.inject.Inject
>> Date: Wed, 13 Apr 2011 16:10:41 +0200
>> From: Stephen Friedrich<stephen.friedrich_at_fortis-it.de>
>> Reply-To: users_at_jersey.java.net
>> To: users_at_jersey.java.net<users_at_jersey.java.net>
>>
>>
>>
>> Guice 3 supports JSR-330.
>> Unfortunately jersey-guice integration has hardcoded tests for @com.google.inject.Inject so I can't use standard
>> annotations :-(
>> Any plans to also support @javax.inject.Inject?
>>
>> -- Stephen
>>
>>
>>
>