Hi Paul,
On Wed, 2008-09-03 at 00:28 +0200, Martin Grotzke wrote:
> Hi Paul,
>
> On Mon, 2008-09-01 at 12:39 +0200, Paul Sandoz wrote:
> > Hi Martin,
> >
> > The SpringResourceProvider patch looks good. Just a couple of minor
> > questions on defaults.
> >
> > If a spring bean is not annotated with @Component does that mean that
> > such information needs to be described in the XML configuration?
> Exactly this is my understanding of the documentation [1] and [2].
>
> Reading this (again) I also noticed that we should also use the spring
> annotations @Repository, @Service and @Controller, as these serve as
> specializations of @Component for more specific use cases. These are
> used by the spring autodetection the same as @Component.
>
> I'll add support for these annotations to the SpringResourceProvider.
Done.
>
> As you can read in [3], the spring user can customize the scanning for
> components with filters. This is really nice, though I don't think that
> we have to support s.th. like this right now, but instead might wait
> until a user requests a feature like this.
>
> >
> > If a spring bean is annotated with @Component but not annotated with
> > @Scope is there a default for the scope?
> For spring this is singleton, I'll add this to accordingly.
I just have done this. However, we have to be aware that this asumes,
that users already use spring and then add a jersey annotation to expose
this bean as a resource. If a user starts with jersey and doesn't supply
a jersey lifecycle annotation (so that the jersey default lifecycle is
used) and then/afterwards also uses spring, perhaps he would expect that
the jersey default lifecycle would be used.
What do you think?
>
> >
> > Once i know the answers to the above questions i can improve the
> > JavaDoc
> > related to defaults.
> You refer to javadoc of SpringResourceProvider?
>
> I'll do the changes these days and afterwards commit it to the trunk,
> ok?
I just have noticed that you already committed the patch, thanx :)
However, the changes mentioned above are in the trunk now.
Cheers,
Martin
>
> Cheers,
> Martin
>
>
> [1] http://static.springframework.org/spring/docs/2.5.x/reference/beans.html#beans-stereotype-annotations
> [2] http://static.springframework.org/spring/docs/2.5.x/reference/beans.html#beans-scanning-scope-resolver
>
>
>
>
> >
> > Paul.
--
Martin Grotzke
http://www.javakaffee.de/blog/