0 Replies Latest reply: Aug 23, 2013 12:10 PM by jcpsantos RSS

    Internal event not synthetic at BackingMapListener

    jcpsantos

      Hi,

       

      When using BML to audit the operations that were being done on my caches I identified I strange behavior. I'm doing the following operations on a distributed cache with a read-write backing map, configured with write-behind policy:

      - put entry;

      - update entry with EntryProc;

       

      The BML is triggering three events:

      - onEntryInserted, not synthetic (expected);

      - onEntryUpdated, not synthetic (expected);

      - onEntryUpdated, not synthetic (not expected);

       

      The third event seems to be Coherence updating the entry after it is stored in the database, this is the thread call stack when it is in the BML:

      EventType: NotSynthetic

      java.lang.Thread.getStackTrace(Thread.java:1479)

      pt.ptinovacao.qrp.utils.AuditBML.appendToFile(AuditBML.java:179)

      pt.ptinovacao.qrp.utils.AuditBML.entryUpdated(AuditBML.java:117)

      com.tangosol.util.MapEvent.dispatch(MapEvent.java:270)

      com.tangosol.util.MapEvent.dispatch(MapEvent.java:226)

      com.tangosol.util.MapListenerSupport.fireEvent(MapListenerSupport.java:573)

      com.tangosol.net.cache.ReadWriteBackingMap$InternalMapListener.dispatch(ReadWriteBackingMap.java:2270)

      com.tangosol.net.cache.ReadWriteBackingMap$InternalMapListener.entryUpdated(ReadWriteBackingMap.java:2139)

      com.tangosol.util.MapEvent.dispatch(MapEvent.java:270)

      com.tangosol.util.MapEvent.dispatch(MapEvent.java:226)

      com.tangosol.util.MapListenerSupport.fireEvent(MapListenerSupport.java:573)

      com.tangosol.net.cache.OldCache.dispatchEvent(OldCache.java:1983)

      com.tangosol.net.cache.OldCache$Entry.setValue(OldCache.java:2109)

      com.tangosol.net.cache.OldCache.put(OldCache.java:269)

      com.tangosol.net.cache.ReadWriteBackingMap$StoreWrapper.replace(ReadWriteBackingMap.java:5054)

      com.tangosol.net.cache.ReadWriteBackingMap$StoreWrapper.storeAll(ReadWriteBackingMap.java:4919)

      com.tangosol.net.cache.ReadWriteBackingMap$WriteThread.run(ReadWriteBackingMap.java:4233)

      com.tangosol.util.Daemon$DaemonWorker.run(Daemon.java:803)

      java.lang.Thread.run(Thread.java:662)

       

      The documentation for the "replace" method of the StoreWrapper is here:

      http://docs.oracle.com/middleware/1212/coherence/COHJR/com/tangosol/net/cache/ReadWriteBackingMap.StoreWrapper.html#replace_com_tangosol_net_cache_ReadWriteBackingMap_Entry_

       

      Shouldnt this event be marked as synthetic? It is Coherence internal processing of the cache.

       

      Thanks