On Tue, 2008-07-22 at 11:27 +0200, Paul Sandoz wrote:
> 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.
The SpringServlet now checks for conflicting jersey and spring scopes
and throws a RuntimeException if there's a conflict.
Cheers,
Martin
>
>
> > 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.