users@jersey.java.net

Re: [Jersey] Are ResourceFactory and ResourceProvider deprecated?

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 12 Jan 2009 11:05:41 +0100

Hi Peter,

Gili is working on Guice 2.0 integration with Jersey. The following
issue contains attachments for propose code, which IIRC Gili is
currently using, so you could reuse that for 1.0.1 if you are using
Guice 2.0:

   https://jersey.dev.java.net/issues/show_bug.cgi?id=163

You might be able to adapt the code to work with Guice 1.0.

The Guice 2.0 integration is dependent on when Guice 2.0 is released.
My understanding is the latest date is this January. If so then we
should be able to get some Guice support into the Jersey 1.0.2 release.

Paul.


On Jan 10, 2009, at 10:20 AM, Peter Tan wrote:

> Hi Paul,
>
> We use Guice as our IoC implementation, and in our case using Guice to
> instantiate resources is the easiest way to integrate Jersey with
> our code.
>
> Looks like Jersey 1.0.2 will support Guice, so maybe I should skip
> 1.0.1
> for now and look forward to 1.0.2!!??
>
> -Peter
>
> Date: Mon, 5 Jan 2009 12:07:01 +0100
> From: Paul.Sandoz_at_Sun.COM
> To: users_at_jersey.dev.java.net
> Subject: Re: [Jersey] Are ResourceFactory and ResourceProvider
> deprecated?
>
> Hi Peter,
>
> Sorry about pulling the rug from you like that. We needed to change
> things to support better IoC integration.
>
> If you are supporting your own life-cycle logic you need to implement:
>
> com.sun.jersey.server.spi.component./
> ResourceComponentProviderFactory [1].
>
> This has got a little more complicated. I suggest you look at the
> source code for:
>
> com.sun.jersey.server.impl.resource.SingletonFactory
>
> Do you mind me asking what use-case you are using those for? There
> may be another way that is better since supporting life-cycles is
> hard.
>
> Paul.
>
> https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.1/api/jersey/com/sun/jersey/server/spi/component/ResourceComponentProviderFactory.html
>
> On Dec 27, 2008, at 4:32 AM, Peter Tan wrote:
>
> Hi,
>
> I just tried to upgrade from jersey 1.0.0 to jersey 1.0.1, and seems
> like these two classes are gone. I might miss it but I can't find
> any information in changelogs and Java docs. They just disappeared.
> Could anyone kindly let me know what's the replacement?
>
> thank you,
> -Peter
>
>
> Life on your PC is safer, easier, and more enjoyable with Windows
> Vista®. See how
>
>
> Windows Live™: Keep your life in sync. See how it works.