Action beans should/must be "prototype" scope ?
Tom Zeller
tzeller at dragonacea.biz
Thu Feb 13 17:20:37 EST 2014
>>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.
>
> Yeah, my preferred model would be: checking for an annotation (Springs or
> ours) declared on our base class in a bean factory post processor, with a
> flag at runtime being a backup choice.
I think we should create and use our own @Prototype annotation in
order to annotate actions in OpenSAML, mostly because the
BeanPostProcessor which wraps OpenSAML actions runs after
BeanFactoryPostProcessors.
I kind of think we should annotate each action with @Prototype in
symmetry with defining 'scope="prototype"' for every action bean
definition. I think we should annotate both the OpenSAML and IdP
AbstractProfileAction with @Prototype as well as a default, which is
redundant, but I am okay with the redundancy because of how important
this seems to be.
More information about the dev
mailing list