Strange clustered clients behavior
jacob1111 Sep 17, 2012 5:49 PMHi,
I see unexpected behavior of my clustered clients. Instead of adding
object to the shared cache, my 2nd client overrides the 1st object in
the shared cache. The 1st client always works properly always adding
objects to the cache.
If I start the 2nd client first, the behavior reverses accordingly.
Details:
My two clustered clients/embedded servers run on two different nodes
using one common cache.
My 1st client (the one that I started the first) stores 3 objects:
Input new command > list
Ticket{name='c', show='d'}
Ticket{name='a', show='b'}
Ticket{name='e', show='f'}
My 2nd client correctly shows all 3 objects:
Input new command > list
Ticket{name='c', show='d'}
Ticket{name='a', show='b'}
Ticket{name='e', show='f'}
My 2nd client tries to add new object, but instead overrides the first object:
Input new command > book
Enter name: g
Enter show: h
Booked ticket Ticket{name='g', show='h'}
Input new command > list
Ticket{name='c', show='d'}
Ticket{name='g', show='h'}
Ticket{name='e', show='f'}
My 1st client correctly shows 3 objects
adds another one and correctly shows 4 objects:
Input new command > list
Ticket{name='c', show='d'}
Ticket{name='a', show='b'}
Ticket{name='e', show='f'}
Input new command > book
Enter name: i
Enter show: j
Booked ticket Ticket{name='i', show='j'}
Input new command > list
Ticket{name='c', show='d'}
Ticket{name='g', show='h'}
Ticket{name='i', show='j'}
Ticket{name='e', show='f'}
Input new command >
Question: is it expected behavior?
I don't think so. Both clients should work the same way.
Here are my nodes parameters:
cluster.xml file
<infinispan>
<global>
<transport
nodeName="Infinispan-Node1"
clusterName="infinispan-cluster" >
</transport>
</global>
<namedCache name="clusteredCache">
<clustering mode="replication">
<stateTransfer
chunkSize="0"
fetchInMemoryState="true"
timeout="240000">
</stateTransfer>
<sync replTimeout="20000"/>
</clustering>
</namedCache>
</infinispan>
Both nodes run CentOS 5.5 using JDK 1.6_31 and infinispan-5.1.6.FINAL, JGroups 3.0.11.
The 1st client runs as host, while the 2nd one is a virtual machine on MacBook running 10.7.
Lion OS. However, they behave the same way when I reverse their roles.
Thank you for your help.
Jacob Nikom