2 Replies Latest reply: Feb 13, 2013 7:14 AM by 764975 RSS

    Local Cache with write-behind backing map

    764975
      Hi there,

      I am a Coherence newb, so I hope my question isn't too naive. I have been experimenting with Coherence using a write-behind JPA backing map, but I have only been able to make it work with a distributed cache. Because of my specific database RAC architecture, I need to ensure that entries written to the database from a given WLS node are restricted to a specific RAC node. In my view, using a local cache rather than a distributed cache should solve my problem, although if there is a way of configuring my cache so this works I'd appreciate the info.

      So, the short form of the question: can I back a local cache with a write-behind JPA map?

      Cheers,
      Ron
        • 1. Re: Local Cache with write-behind backing map
          Jonathan.Knight
          Hi Ron,

          The configuration for <local-scheme> allows you to add a cache store but you cannot use write-behind, only write-through.

          Presumably you do not want the data to be shared by the different WLS nodes, i.e. if one node puts data in the cache and that is eventually written to a RAC node, that data cannot be seen in the cache by other WLS nodes. Or do you want all the WLS nodes to share the data but just write it to different RAC nodes?

          If you use a local-scheme then the data will only be local to that WLS node and not shared.

          I can think of a possible way to do what you want but it depends on the answer to the above question.

          JK
          • 2. Re: Local Cache with write-behind backing map
            764975
            Thanks for the response.

            There is no harm if the cache entries are visible across the cluster. However, the application architecture requires that a given MS must write all its records to a specific RAC node, e.g. MS1 to RAC1, MS2 to RAC2, etc.

            Ron