3 Replies Latest reply on Feb 7, 2012 2:41 AM by Galder Zamarreño

    Infiinispan cache is not replicated on Jboss AS 7.0.2

    Nick Prusov Newbie

      Hi, hope someone will help me to resolve the issue with infinispan cache replication problem using Jboss AS 7.0.2, Java 1.6, Infinispan 5.1.1 FINAL on 2 Nodes cluster environment using 2 different boxes. I have code successfully running on 2 Nodes using 2 different boxes cluster environment Jboss AS 5.1.0, Java 1.6, Infinispan 5.1.1.FINAL. The situation is even worse cause the code is running fine when I am testing on local cluster environment Jboss 7.0.2, Java 1.6, Infinispan 5.1.1.FINAL with 2 Nodes using one machine. Issue with Jboss AS 7.0.2 looks like relates to JGroups cause I can't see in log that one machine can see another through the infinispan log entries when they are up and running, but Jboss AS 5.1.0 does using the same infrastructure. Firewall is off on both machines and they are physically on the same network. I am sure it's not due to  Infinispan 5.1.1 FINAL as I was trying with 5.1.1.CR1 as well. Cluster itself on Jboss AS 7.0.2 is starting normally no errors in the log.

       

      Basically the code:

      import org.infinispan.Cache;

      import org.infinispan.configuration.cache.CacheMode;

      import org.infinispan.configuration.cache.ConfigurationBuilder;

      import org.infinispan.configuration.global.GlobalConfigurationBuilder;

      import org.infinispan.manager.DefaultCacheManager;

      import org.infinispan.transaction.LockingMode;

      import org.infinispan.transaction.TransactionMode;     

       

      static final String CACHE_NAME = "replSyncCache";   

      static Cache defaultCache;     

       

      GlobalConfigurationBuilder globalConfig = new GlobalConfigurationBuilder().clusteredDefault();     

      DefaultCacheManager cacheManager = new DefaultCacheManager(globalConfig.build());     

      cacheManager.defineConfiguration(CACHE_NAME, new ConfigurationBuilder().clustering().cacheMode(CacheMode.REPL_SYNC).transaction().lockingMode(LockingMode.PESSIMISTIC).transactionMode(TransactionMode.TRANSACTIONAL).build());         

      defaultCache = cacheManager.getCache(CACHE_NAME); 

       

       

      ..... Put operation:  defaultCache.put("key", "Value");

       

      ......  Get operation: defaultCache.get("key");