|The three cases I see are:
|* Reentrant call within one tx. This one is simple: just check if
|the ctx is
|locked and the locking tx is the same as the current
:) you looked at teh code? it is not sufficient (if the instance was
calling and is reentrant is false then we can't detect)
|* Reentrant call through A, calling B which has RequiresNew, which calls A.
|This one will be resolved through tx timeout (it is a form of deadlock).
|>From a reentrancy point of view the timeout exception follows the spec
|semantics of reentrancy (i.e. exc is thrown).
yes a timeout will prevent a deadlock
|* Reentrant call without any tx's at all, which would require the callstack
|to do properly. This one is tougher since there are no timeouts. We should
|probably do a manual timeout of this in the instanceinterceptor.
well the "callstack" can carry ctx ids or cachekey ids and we can detect a
"duplicate". I don't see anything since the first case is not enough, you
need the actual stack of ctx to do comparisons at every bean and throw a
'reentrant' exception if needed... overkill imho
|These are the cases I see. The first one is simple, and the other two
|require timeouts.
|
|Makes sense?
almost, almost
again the stack is the only foolproof solution
marc
|
|/Rickard
|
|
|
|