0

We are using Infinispan 7.2.1 as replicated persisted cache between 2 nodes. We are using also Tomcat and Spring. No hibernate involves.

The first node is reading and writing to the cache.

The second node is only reading from the cache.


The problem we encounter:

The values node #2 reads from the cache are the values of the first insert done by node #1. Updates to an existing keys are not reflected when node 2 gets an entry from the cache.


Example:

Node 1: cache.put('x', 1)
Node 1: cache.put('x', 2)
Node 1: cache.put('x', 3)
Node 2: cache.get('x') ==> return 1 (!)

Snippet from our Infinispan configuration xml file:

<cache-container default-cache="OM_FILE_LAST_INSPECTION_REPLICA_CACHE" name="org.infinispan.offline.replica">
<transport stack="tcpStack" cluster="om_cluster" />
------
<replicated-cache name="OM_TASK_PROGRESS_REPLICA_CACHE" mode="SYNC">
    <locking striping="false" />
    <transaction mode="NON_XA" locking="PESSIMISTIC" />
    <eviction strategy="NONE" />
    <persistence passivation="false">
        <file-store max-entries="10000" path="path to some folder on disk" />
    </persistence>
</replicated-cache>
------


When debugging I also noticed the following like in the log:

2015-10-15 09:27:15,584 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Trying to lookup TransactionManager for JBoss AS 7 
2015-10-15 09:27:15,585 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Failed to perform a lookup for [java:jboss/TransactionManager (JBoss AS 7)] 
2015-10-15 09:27:15,585 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Trying to lookup TransactionManager for JBoss AS 4 ~ 6, JRun4 
2015-10-15 09:27:15,585 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Failed to perform a lookup for [java:/TransactionManager (JBoss AS 4 ~ 6, JRun4)] 
2015-10-15 09:27:15,585 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Trying to lookup TransactionManager for Resin 3.x 
2015-10-15 09:27:15,585 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Failed to perform a lookup for [java:comp/TransactionManager (Resin 3.x)] 
2015-10-15 09:27:15,585 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Trying to lookup TransactionManager for Sun Glassfish 
2015-10-15 09:27:15,586 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Failed to perform a lookup for [java:appserver/TransactionManager (Sun Glassfish)] 
2015-10-15 09:27:15,586 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Trying to lookup TransactionManager for Borland, Sun 
2015-10-15 09:27:15,586 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Failed to perform a lookup for [java:pm/TransactionManager (Borland, Sun)] 
2015-10-15 09:27:15,586 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Trying to lookup TransactionManager for BEA WebLogic 
2015-10-15 09:27:15,586 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Failed to perform a lookup for [javax.transaction.TransactionManager (BEA WebLogic)] 
2015-10-15 09:27:15,586 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Trying to lookup TransactionManager for Resin, Orion, JOnAS (JOTM) 
2015-10-15 09:27:15,588 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Failed to perform a lookup for [java:comp/UserTransaction (Resin, Orion, JOnAS (JOTM))] 
2015-10-15 09:27:15,588 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Trying to lookup TransactionManager for Karaf 
2015-10-15 09:27:15,591 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Failed to perform a lookup for [osgi:service/javax.transaction.TransactionManager (Karaf)] 
2015-10-15 09:27:15,591 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Trying WebSphere 5.1: com.ibm.ws.Transaction.TransactionManagerFactory 
2015-10-15 09:27:15,594 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Trying WebSphere 5.0: com.ibm.ejs.jts.jta.TransactionManagerFactory 
2015-10-15 09:27:15,598 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Trying WebSphere 4: com.ibm.ejs.jts.jta.JTSXA 
2015-10-15 09:27:15,601 DEBUG [localhost-startStop-1] [GenericTransactionManagerLookup] Couldn't find any WebSphere TransactionManager factory class, neither for WebSphere version 5.1 nor 5.0 nor 4 
2015-10-15 09:27:15,612 WARN  [localhost-startStop-1] [GenericTransactionManagerLookup] ISPN000104: Falling back to DummyTransactionManager from Infinispan 
Oz Molaim
  • 2,016
  • 4
  • 20
  • 29
  • No `ISPN000094: Received new cluster view` message? The warning should be harmless, but you can avoid it with `` – Dan Berindei Oct 15 '15 at 15:11
  • BTW, this isn't really a programming question, so it would be asked on the Infinispan forums at https://developer.jboss.org/en/infinispan/content?filterID=contentstatus%5Bpublished%5D~objecttype~objecttype%5Bthread%5D – Dan Berindei Oct 15 '15 at 15:37
  • As Dan said, the question would be better asked in the Infinispan forums. In any case, hard to tell from the information at hand. Enabling TRACE for org.infinispan package would be easiest to see what is happening with each put. As Dan rightly suggested, you need to make sure a cluster is formed and data can flow without problems between nodes, whichever transport you have chosen (TCP, UDP...etc) – Galder Zamarreño Oct 20 '15 at 14:28
  • Thank you very much - I will. – Oz Molaim Oct 21 '15 at 12:08

0 Answers0