HHH-9804 Ehcache integration uses a write lock where a read lock is requested in EhcacheTransactionalDataRegion
This commit is contained in:
parent
7308e14fed
commit
4b3a655d49
|
@ -263,7 +263,7 @@ public class EhcacheTransactionalDataRegion extends EhcacheDataRegion implements
|
||||||
*/
|
*/
|
||||||
public final void readLock(Object key) throws CacheException {
|
public final void readLock(Object key) throws CacheException {
|
||||||
try {
|
try {
|
||||||
lockProvider.getSyncForKey( key ).lock( LockType.WRITE );
|
lockProvider.getSyncForKey( key ).lock( LockType.READ );
|
||||||
}
|
}
|
||||||
catch (net.sf.ehcache.CacheException e) {
|
catch (net.sf.ehcache.CacheException e) {
|
||||||
if ( e instanceof NonStopCacheException ) {
|
if ( e instanceof NonStopCacheException ) {
|
||||||
|
@ -285,7 +285,7 @@ public class EhcacheTransactionalDataRegion extends EhcacheDataRegion implements
|
||||||
*/
|
*/
|
||||||
public final void readUnlock(Object key) throws CacheException {
|
public final void readUnlock(Object key) throws CacheException {
|
||||||
try {
|
try {
|
||||||
lockProvider.getSyncForKey( key ).unlock( LockType.WRITE );
|
lockProvider.getSyncForKey( key ).unlock( LockType.READ );
|
||||||
}
|
}
|
||||||
catch (net.sf.ehcache.CacheException e) {
|
catch (net.sf.ehcache.CacheException e) {
|
||||||
if ( e instanceof NonStopCacheException ) {
|
if ( e instanceof NonStopCacheException ) {
|
||||||
|
|
Loading…
Reference in New Issue