2 Replies Latest reply on Jul 25, 2013 3:33 PM by praveen435

    coherence data storage



      Data is stored in coherence as a key-value pair.Is there any way to store the xml data in the coherence.I know one way to convert the xml data in to java object and put the object in the cache. Is there any other way to cache the xml data?

        • 1. Re: coherence data storage



          It depends what you want to be able to do with the XML and how big it is.


          If you just want to put it in and get it out by key then you can just store it as a String or if it is big then a compressed byte array - which is what we do on my current client's project.


          If you want to query the XML, then it gets more complicated.

          One option is to write a custom ValueExtractor that can take an XPath statement and query the XML - we do this too, although it could be slow for big XML documents.

          Another option is to write a wrapper object that contains the XML and some extracted values that you can query on - I have seen this done on some projects.



          • 2. Re: coherence data storage

            Hi JK,

            Thanks for the reply. In OSB, ResultCaching facility is available.So in which form the xml data is storing in the result cache?