[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3818?page=c...
]
Armin Haaf commented on HHH-3818:
---------------------------------
because of this issue, we cannot use hibernate 3.3.2 and jbc 2 in our project (jboss as
5.1). We are getting the exception, when a entity in the cache gets updated. The only
solution we found was to deactivate the second level cache.
So i want to know, if there is a workaround for the issue, or if it is not possible for us
to use jbc as second level cache. As far as i understand this issue, there is no
workaround, so jbc is not usable for us.
Hibernate/JBC integration doesn't property handle
Entity/CollectionRegionAccessStrategy evictAll
------------------------------------------------------------------------------------------------
Key: HHH-3818
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3818
Project: Hibernate Core
Issue Type: Bug
Components: caching (L2)
Affects Versions: 3.3.1
Reporter: Brian Stansberry
Assignee: Brian Stansberry
Fix For: 3.3.x, 3.5.0-Beta-2
EntityRegionAccessStrategy and CollectionRegionAccessStrategy have evict(Object key) and
evictAll() that say they must cause removal of items from the cache "immediately
without regard for transaction isolation." The Hibernate/JBC integration is not
properly handling this as the JBC removeNode calls it makes are not dealing with
transactional issues. The integration needs to:
1) Perhaps suspend any ongoing tx (particularly since these calls are typically made from
a tx Synchronization's afterCompletion() callback, when the tx is Status.COMMITTED and
it isn't appropriate to call into the cache expecting the cache to incorporate the
call into the transaction. (Alhthough I believe JBC handles this correctly by ignoring the
tx, since it isn't ACTIVE).
2) Deal with the fact that the tx that is being committed is likely holding locks in JBC.
This is the big issue. I believe dealing with this will a) require keeping state in the
Hib/JBC integration layer's Region to track that an eviction has occurred but may not
be reflected in JBC b) using JBC as a notification bus to propagate the fact of the
eviction to other nodes c) attempting to evict the data from JBC locally, failing promptly
in the face of lock conflicts d) including in any get() or putFromLoad() calls logic to
check the state from a), again attempting to evict locally (with a very short timeout) if
not yet evicted and not allowing calls to proceed into JBC until successful.
This JIRA is for handling evictAll(), which Hibernate core itself executes as part of
handling bulk updates. This is the call for which user problems have been reported. See
HHH-4517 for evict(Object).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira