| An alteration wrapper designed to prevent simultaneous access to flow or
scoped data. Only incurs a synchronized overhead if there is actually an
active flow or scope for the current request, i.e. in the case of a scope, it
successfully restored a bean from the scope. If another request in in the
flow, this wrapper will simply block - in practice this is no real burden
since this condition could only be triggered by multiple simultaneous
requests from the same user/browser. Could be a liability however if under
some (possibly failure) condition, normal request handling might take an
unbounded time - in this case you may want to replace this wrapper with an
implementation performing wait/notify with a timeout.
If operating in a clustered environment where handling of different requests
belonging to the same flow cannot be guaranteed to be passed to the same JVM,
you will certainly require to replace this implementation.
author: Antranig Basman (amb26@ponder.org.uk) |