|-----Original Message-----
|From: [EMAIL PROTECTED]
|[mailto:[EMAIL PROTECTED]]On Behalf Of Rickard Oberg
|Sent: Saturday, October 21, 2000 12:49 PM
|To: jBoss Developer
|Subject: Re: [jBoss-Dev] Release lock bug in JDK? Fixed ?
|
|
|
|
|> |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)
|
|Sorry, I'm not following here. What exactly is the problem?

If you call an instance and check the Tx you will go in the block.  Now if
it is called from something else than the instance (bean or client) then it
is OK, just a new participating thread in the block, blah blah.  but if it
is from the instance and in the instance we still need an exception... we
still need to detect the instance callback... not portable, hard, for
what????

marc

|
|> |* 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
|
|Well, it would also be possible to do a "fake tx", i.e. just add some kind
|of id to pass along the call chain. When we lock we set it (just as we
|associate the ctx with the tx on lock) so that we can check if a locked
|instance has the same tx or fake tx=reentrant call.
|
|So, it would be possible (although you seem to be saying that the tx check
|don't work), but not exactly portable.
|
|/Rickard
|
|
|
|


Reply via email to