Action beans should/must be "prototype" scope ?

Cantor, Scott cantor.2 at osu.edu
Fri Nov 6 13:06:18 EST 2015


On 11/6/15, 12:12 PM, "dev on behalf of Tom Zeller" <dev-bounces at shibboleth.net on behalf of tzeller at dragonacea.biz> wrote:



>Is it okay to use annotations for something other than documentation
>in non-test code ?

We already do (@Duration), with some pros and cons.

>Given a bean definition lacking scope="prototype" whose class or
>superclass is somehow annotated as "prototype", should we (a) change
>the scope of the bean definition in a post processor or (b) just log
>an error or (c) throw an exception ?

I'm not all that in favor of changing the scope on the fly for something we fully control and is obviously correctable.

But if we wanted to blow up and just insist that all actions be prototype, I wouldn't be opposed.

-- Scott



More information about the dev mailing list