Action beans should/must be "prototype" scope ?

Rod Widdowson rdw at steadingsoftware.com
Thu Feb 6 04:24:22 EST 2014


It strikes me that this has the makings of incredibly difficult to diagnose
bugs with potentially disastrous security implications...  Having the
information separated by such a distance from the code worries me, and
debugging Java is hard enough that I don't want to consider debugging XML
any more than I have to.

I was wondering whether we can protect against this?  Prototype-bean actions
should never see a #preExecute after an #execute(), right?  So could we set
a flag in execute and test it in #preExecute().  If we did this somewhere
deep in the class hierarchy we would get a lot of bang for our buck.

I guess there are other ways of detecting this as well, but that seemed like
the simplest.

Then, as Tom suggested, we could then use annotations for the non-prototype
case.

/r



More information about the dev mailing list