3 Replies Latest reply on Mar 12, 2005 9:39 AM by belaban

    Is there to make a particular request "Read_Uncommited" ?

    xavierpayne2

      I have a normal (non AOP) REPL_SYNC cache... and I want in just one section of code to do a cache read regardless of any locks. For this one particular section of code I don't really care if the cache state is inconsistent or a write is in progress... I just want a print out of the entire cache... (Actually I am doing more than that, but the idea here is I am accessing the cache exclusively for a read where I don't care if state changes while I am reading.)

      I don't want to change the isolation level to READ_UNCOMMITED for the whole cache... because everything else still needs the repeatable read semantics...

      Is there a publicly accessible read for TreeCache that ignores write locks?

        • 1. Re: Is there to make a particular request

          Currently, isolation level is per cache instance. So you will need to have two separate cache instance to what you want.

          Region based is in the roadmap though.

          -Ben

          • 2. Re: Is there to make a particular request
            xavierpayne2

            Doh. Perhaps I'll write my own method then...

            the problem is I have an asycrounous thread that checks every n milliseconds for cache modifications (determined by a cache listener setting a boolean value). If cache has been modified I then do a recursive deep copy of the entire cache into our own tree of hashmaps and publish the "snapshot" of cache to another application using JMS.

            Everything else needs to tree reads to this cache as Repeatable_Read. I only want specifically the method thats doing the deep copy to ignore lock writes. Becuase right now I get exceptions from the transaction manager if a write based cache interaction is going on while I am doing the deep copy.

            I need to think on this a bit more... If I do implement my own method I'll be sure to submit a path to you guys so you can incorporate it if you want.

            • 3. Re: Is there to make a particular request
              belaban

              This may be covered by the JIRA task below. It will allow you to override selected cache properties per method call, e.g. sync-async repl, lock acquisition timeout etc:
              http://jira.jboss.com/jira/browse/JBCACHE-106