5 Replies Latest reply on May 21, 2014 9:31 AM by nadirx

    Tree API and cache notifications - unable to get modified content inside @CacheEntryModified event

    michael_gronau

      Hello,

      I'm trying to port our app to JBoss 7.1 (I'm using currently the nightly build 7.1.2.final). I have successfully created a tree cache and have registered a CacheListener listening on @CacheEntryModified.

       

      When I put data to the cache like this:

       

      dataMap = new HashMap<String, Object>();

      dataMap.put("somedata", someObject)

       

      this.treeCache.put("test/something", dataMap)

       

      the listeners method is called but the Events AtomicHashMap (which in my understanding should contain the new dataMap) is always empty.

      Furthermore the event is called 4 times for the single put operation for the ContentType.DATA  (2 calls for isPre=true and 2 calls for isPre=false)?? I even tried to get the data map from the treeCache directly but within the listener method there is no data available (I think it's because the transaction is not committed at this moment or something like that).

       

      After the put operation the dataMap object can successfully be requested by this.treeCache.get("test/something", "somedata");

      The cache is configured to be running in REPL_SYNC mode. Am I missing somehting or is this a bug?

       

      With best regards,

       

      Michael Gronau