2 Replies Latest reply on Aug 31, 2004 9:27 AM by ben.wang

    global locking strategy

    visionlink

      i am using the jboss-3.2 branch version of jboss-cache.

      org.jboss.cache.TreeCache.setIsolationLevel calls LockStrategyFactory.setIsolationLevel. this appears to mean that we cannot configure multiple TreeCache's with different isolation levels simultaneously.

      i am attempting to create two TreeCache's, one with REPEATABLE_READ and one with NONE. while using REPEATABLE_READ instance, i get NPEs because LockStrategyFactory.getIsolationLevel returns null.

      Caused by: java.lang.NullPointerException
       at org.jboss.cache.lock.IdentityLock.acquireReadLock(IdentityLock.java:175)
       at org.jboss.cache.Node.acquireReadLock(Node.java:346)
       at org.jboss.cache.Node.acquire(Node.java:331)
       at org.jboss.cache.TreeCache.findNode(TreeCache.java:2916)
       at org.jboss.cache.TreeCache._put(TreeCache.java:1860)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jgroups.blocks.MethodCall.invoke(MethodCall.java:236)
       at org.jgroups.blocks.MethodCall.invoke(MethodCall.java:268)
       at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:2698)
       at org.jboss.cache.TreeCache.put(TreeCache.java:1350)
       at com.dynix.util.cache.HibernateTreeCache.put(HibernateTreeCache.java:55)