[jboss-jira] [JBoss JIRA] Resolved: (EJBTHREE-844) We need a optimistic locking version of TreeCacheProviderHook
Brian Stansberry (JIRA)
jira-events at lists.jboss.org
Tue Feb 20 01:14:32 EST 2007
[ http://jira.jboss.com/jira/browse/EJBTHREE-844?page=all ]
Brian Stansberry resolved EJBTHREE-844.
---------------------------------------
Resolution: Done
Added class org.jboss.ejb3.entity.OptimisticJBCCache that implements for OptimisticTreeCache the same EJBTHREE-798 fixes the JBCCache does for pessimistic locking.
TreeCacheProviderHook is now agnostic as to whether optimistic or pessimistic locking is used. It simply checks the JBoss Cache configuration and provides instances of OptimisticJBCCache or JBCCache based on what it finds.
OptimisticTreeCacheProviderHook was added in order to have a logical parallel to the Hibernate OptimisticTreeCacheProvider class. It really doesn't add anything beyond TreeCacheProviderHook though, other than logging a warning if it discovers JBoss Cache is configured for pessimistic locking.
> 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: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list