Action beans should/must be "prototype" scope ?

Brent Putman putmanb at georgetown.edu
Thu Feb 6 14:13:49 EST 2014


On 2/6/14 1:40 PM, Tom Zeller wrote:
> Looks like we could annotate actions with @Scope 
>  @Scope(BeanDefinition.SCOPE_PROTOTYPE)


You beat me to it, I was going to bring up Spring's @Scope annotation.

I guess you are implicitly saying we can't use it literally the way
Spring wants to because we don't want to do component scanning, etc?  Or
else we know that that doesn't combine with XML-declared beans?

If so: Perhaps we could still make use of a BeanFactoryPostProcessor to
implement the @Scope annotation in a different way than
component-scanning, by using it to directly set the scope on the bean
definition.  I haven't tried this, so don't know if works.


More information about the dev mailing list