users@jersey.java.net

Re: [Jersey] Jersey and Spring

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 22 Jul 2008 11:27:22 +0200

Lars Tackmann wrote:
> On Mon, Jul 7, 2008 at 10:24 AM, Martin Grotzke
> --
> @PerRequest
> @Component
> @Scope( "prototype" )
> --
>
> I can understand the component part, but having to use springs @Scope
> annotation is overkill (at least when one also uses Jersey's lifecycle
> annotations).
>

I agree, but i am not sure what we can do about it. You can remove the
@PerRequest if you wish as that is the default life-cycle but still...

Also it is easy to create conflicts:

   @Singleton
   @Component
   @Scope("prototype")

But it should be up to the Jersey spring component provider to detect that.


> Anyway thanks for the help. I suspect I will have a complete mavenised
> Spring/Jersey sample ready in a couple of days (integrated with Spring
> security 2) - I will gladly post it here, so others can benefit from
> it
>(perhaps it can go into jersey's example folder).
>

Please do! that would be a great contribution.

Paul.

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109