[
http://jira.jboss.com/jira/browse/JBCACHE-785?page=comments#action_12344024 ]
Owen Taylor commented on JBCACHE-785:
-------------------------------------
I probably should also mention the context: this problem occurs with the
text.hibernate.cache.TreeCache.put() which suspends the current transaction when caching
data into the cache after a cache miss. I believe (but have not verified experimentally)
that it will also occur with the suspend that is done internally inside the tree cache
when Option.setFailSilently() has been called.
InvocationContext and suspended transactions
--------------------------------------------
Key: JBCACHE-785
URL:
http://jira.jboss.com/jira/browse/JBCACHE-785
Project: JBoss Cache
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 1.4.0.SP1
Reporter: Owen Taylor
Assigned To: Manik Surtani
Attachments: SuspendTxTest.java
The attached test case demonstrates that if you:
A) Make calls to the tree cache
B) suspend the current transaction
C) Make more calls to the tree cache
The locks created at step C) are sometimes attached to the suspended transaction; it
seems this is because the cached transactions in InvocationContext are only reliably
cleared when a transaction is committed.
It's possible that *always* passing true in the call to scrubInvocationCtx() at the
end of TxInterceptor.invoke() would work, but I'm not sure it is the correct thing to
do, or what the effect would be on performance. (Presumably there is some reason not to
just always look up the current transaction.)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira