0 Replies Latest reply on Nov 5, 2008 3:53 PM by andre.rigon

    Problem with SERIALIZABLE Isolation Level

    andre.rigon

      Hello guys,

      I'm using JBossCache 1.4.1.SP9.
      I need to use SERIALIZABLE isolation level in my application.
      I did the following test:

      1) started one jboss instance and at some point did:

      TreeCache cache = cacheManagerImpl.getCache();
      cache.put("1", "1", "test");
      cache.getTransactionManager().begin();
      cache.put("1", "1", "test2");
      

      and never call commit.

      in other jboss instance, I did:

      TreeCache cache = cacheManagerImpl.getCache();
      cache.getTransactionManager().begin();
      @SuppressWarnings("unchecked")
      T returnString = (T) cache.get("1", "1");
      cache.getTransactionManager().commit();
      return returnString;
      


      So, I was expecting a failure, because the isolation level is SERIALIZABLE, and I didnt make a commit in the first jboss instance.

      But the second code block succeed with no error.
      If a had inserted a cache.put(..) in the second block, it would fail.

      Are my expects corrects? Or I misunderstanding something?

      thanks in advance,

      andre