tomcat simple cluster
micou94 Feb 18, 2011 5:17 AMHi,
i develop an application for a server tomcat and actually i would like a simple cache cluster between two tomcat server (machine A and B).
i try to make cluster local and it work very good but when it is two different machine and i think it is due to a config xml, i do not know.
i saw this tutorial http://community.jboss.org/wiki/settingupaninfinispancluster but it doesn't solve my problem.
i try to make a simple programme :
it is very simple but it works with 2 JVM cluster in local.
private Cache cache = null;
private EmbeddedCacheManager cm = null;
private TreeCache treecache = null;
//init
public void init()
{
try {
cm = new DefaultCacheManager("../../cache.xml");
} catch (IOException e1) {
System.out.println("Cachemanager XML : " + e1.getStackTrack());
}
try {
cache = cm.getCache();
}
catch(Throwable e){
System.out.println("getcache error or XML: " + e.getStackTrace());
}
try{treecache = new TreeCacheFactory().createTreeCache(cache);
}
catch(Throwable e){
System.out.println("Creation du treecache: "+e.toString());
}
treecache.start();
}
i give you my cache.xml and my jgroups-tcp.xml, i hope you can help me because i want a simple utilisation of infinispan between two machine and it is doesnt work, i think because i got a little mistake and i did not see ;/
when i launch my two tomcat with my api nothing append, they work but they do not have cluster.
1- is it a problem with conf tomcat xml ?
2- is it a problem with cache or jgroups-tcp xml ?
thanks for your help
-
jgroups-tcp.xml 2.6 KB
-
cache.xml 1.6 KB