title: Ehcache Jgroups replication using TCP
body: <p>I am trying to setup a replicated cache using Jgroups in Ehcache.I am having problems in clustering the cache.I created 2 projects  in eclipse each refering to different ehcache.xml configuration file.</p>
  
  <p>Both the configuration files are identical and is given beolw.</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;cacheManagerPeerProviderFactory
      class="net.sf.ehcache.distribution.jgroups.JGroupsCacheManagerPeerProviderFactory"
      properties="connect=TCP(bind_port=7800):
      TCPPING(initial_hosts=localhost[7800],localhost[7801];port_range=10;timeout=3000;
      num_initial_members=3):
      VERIFY_SUSPECT(timeout=1500):
      pbcast.NAKACK(retransmit_timeout=3000):
      pbcast.GMS(join_timeout=50000;print_local_addr=true)"
  propertySeparator="::" /&gt;
  
   &lt;cache name="sampleCache"
          maxElementsInMemory="1000000"
          eternal="true"
          overflowToDisk="false"&gt;
          &lt;cacheEventListenerFactory
          class="net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicatorFactory"
          properties="replicateAsynchronously=true"/&gt;
  &lt;/cache&gt;
  </code></pre>
  
  <p></p>
  
  <p>I am using the following jar files in my classpath.</p>
  
  <p>-ehcache-2.9.0.jar
  -ehcache-jgroupsreplication-1.7.jar
  -jgroups-3.6.0.Final.jar
  -log4j-1.2.16</p>
  
  <p>When  I run the programs project1 shows</p>
  
  <pre><code>63511 [main] DEBUG org.jgroups.protocols.pbcast.NAKACK  - 
  [SBSPBWSVM110-42986 setDigest()]
  existing digest:  []
  new digest:       SBSPBWSVM110-42986: [0 (0)]
  resulting digest: SBSPBWSVM110-42986: [0 (0)]
  63511 [main] DEBUG org.jgroups.protocols.pbcast.GMS  - SBSPBWSVM110-42986: installing view [SBSPBWSVM110-42986|0] (1) [SBSPBWSVM110-42986]
  63543 [main] DEBUG org.jgroups.protocols.pbcast.GMS  - SBSPBWSVM110-42986: created cluster (first member). My view is [SBSPBWSVM110-42986|0], impl is org.jgroups.protocols.pbcast.CoordGmsImpl
  Jan 09, 2015 11:49:51 AM net.sf.ehcache.distribution.jgroups.JGroupsCacheManagerPeerProvider init
  
  INFO:JGroups Replication started for 'EH_CACHE'. JChannel: local_addr=SBSPBWSVM110-42986
  cluster_name=EH_CACHE
  my_view=[SBSPBWSVM110-42986|0] (1) [SBSPBWSVM110-42986]
  state=CONNECTED
  discard_own_messages=true
  state_transfer_supported=false
  </code></pre>
  
  <p>When  I run the programs project2 shows</p>
  
  <pre><code>63451 [main] DEBUG org.jgroups.protocols.pbcast.NAKACK  - 
  [SBSPBWSVM110-20554 setDigest()]
  existing digest:  []
  new digest:       SBSPBWSVM110-20554: [0 (0)]
  resulting digest: SBSPBWSVM110-20554: [0 (0)]
  63451 [main] DEBUG org.jgroups.protocols.pbcast.GMS  - SBSPBWSVM110-20554: installing view [SBSPBWSVM110-20554|0] (1) [SBSPBWSVM110-20554]
  63452 [main] DEBUG org.jgroups.protocols.pbcast.GMS  - SBSPBWSVM110-20554: created cluster (first member). My view is [SBSPBWSVM110-20554|0], impl is org.jgroups.protocols.pbcast.CoordGmsImpl
  Jan 09, 2015 11:49:51 AM net.sf.ehcache.distribution.jgroups.JGroupsCacheManagerPeerProvider init
  
  INFO: JGroups Replication started for 'EH_CACHE'. JChannel: local_addr=SBSPBWSVM110-20554
  cluster_name=EH_CACHE
  my_view=[SBSPBWSVM110-20554|0] (1) [SBSPBWSVM110-20554]
  state=CONNECTED
  discard_own_messages=true
  state_transfer_supported=false
  </code></pre>
  
  <p>But the replication simply isnt happening.I have done the RMIreplication using Ehcache and following the same approach here also. So I am assuming nothing is wrong in my java code.</p>
  
  <p>I am unable to find the issue here.Is my configuration wrong??Please help me with this issue..</p>