Well, actually it does compile - if the class is written in Groovy. :-) Have to investigate this further. Anyway, I now understand that @Scope is allowed on a service implementation class, but not on its fields. Thanks for the clarification!
Cheers, Peter Thiago H. de Paula Figueiredo wrote: > > Hi! > > The @Scope can't be used in fields: it wouldn't compile (@Scope is > defined with @Target(value={TYPE,METHOD})). In addition, each service > has only one scope, defined in its builder method. From > http://tapestry.apache.org/tapestry5/tapestry-ioc/service.html: > > "Each service has a lifecycle that controls when the service > implementation is instantiated." > "Service lifecycle is specified using the @Scope annotation, which is > attached to a builder method." When this annotation is not present, > the default scope, "singleton" is used." > > -- > Thiago > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > > -- View this message in context: http://www.nabble.com/Why-does-Registry.get%28Class%2C-AnnotationProvider%29-ignore-%40Scope--tp25323724p25323942.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org