HHH-9804 Ehcache integration uses a write lock where a read lock is requested in EhcacheTransactionalDataRegion

This commit is contained in:
Sanne Grinovero 2015-05-15 22:17:52 +01:00
parent 7308e14fed
commit 4b3a655d49
1 changed files with 2 additions and 2 deletions

View File

@ -263,7 +263,7 @@ public class EhcacheTransactionalDataRegion extends EhcacheDataRegion implements
*/
public final void readLock(Object key) throws CacheException {
try {
lockProvider.getSyncForKey( key ).lock( LockType.WRITE );
lockProvider.getSyncForKey( key ).lock( LockType.READ );
}
catch (net.sf.ehcache.CacheException e) {
if ( e instanceof NonStopCacheException ) {
@ -285,7 +285,7 @@ public class EhcacheTransactionalDataRegion extends EhcacheDataRegion implements
*/
public final void readUnlock(Object key) throws CacheException {
try {
lockProvider.getSyncForKey( key ).unlock( LockType.WRITE );
lockProvider.getSyncForKey( key ).unlock( LockType.READ );
}
catch (net.sf.ehcache.CacheException e) {
if ( e instanceof NonStopCacheException ) {