]
Galder Zamarreno reassigned EJBTHREE-844:
-----------------------------------------
Assignee: Brian Stansberry (was: Galder Zamarreno)
cheers :)
We need a optimistic locking version of TreeCacheProviderHook
-------------------------------------------------------------
Key: EJBTHREE-844
URL:
http://jira.jboss.com/jira/browse/EJBTHREE-844
Project: EJB 3.0
Issue Type: Bug
Components: Clustering
Affects Versions: EJB 3.0 RC9 - Patch 1, EJB 3.0 RC9 - FD
Reporter: Galder Zamarreno
Assigned To: Brian Stansberry
Fix For: EJB 3.0 RC10 - FD
Attachments: OptimisticTreeCacheProviderHook.java
Original Estimate: 4 hours
Remaining Estimate: 4 hours
Currently, EJB3/Hibernate cannot take advantage of using a second level
cache based in optimistic locking in a EJB3 environment. We only have a
TreeCacheProviderHook CacheProvider for pessimistic locking which
means that if a customer wants to set up optimistic locking, it's forced to
use OptimisticTreeCacheProvider.
However, this class was not designed for managed environments and
ends up creating another cache, so you end up with two caches for the
same job in the same instance which is wrong.
I have created a OptimisticTreeCacheProviderHook which creates an
org.hibernate.cache.OptimisticTreeCache based on the TreeCacheMBean
instance looked up. Please find attached.
This could be improved by creating a accessor method for
TreeCacheProviderHook.cache, so that I can directly extend it rather
than reimplementing CacheProvider. But, I have followed the
CacheProvider implementation path so that I can quickly send a
patched jar to the customer containing just this class.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: