-
1. Re: try migration JBoss cache to infinispan
galder.zamarreno Jan 4, 2011 9:25 AM (in response to micou)Re 1) You should use TreeCacheFactory to create tree cache instances, see http://community.jboss.org/docs/DOC-16081
Re 2) The equivalent is org.infinispan.context.Flag but note that it might not be working fully Ok due to https://issues.jboss.org/browse/ISPN-841
Re 3) Yes
-
2. try migration JBoss cache to infinispan
micou Jan 7, 2011 7:02 AM (in response to galder.zamarreno)good everything it is ok now
bye
-
3. try migration JBoss cache to infinispan
micou Jan 14, 2011 11:34 AM (in response to micou)hi,
i have question with your new treecache impl.
i instanced my treecache like that:
Cache cache = new DefaultCacheManager("config.xml").getCache();
// cache.start();
cache.addListener(new SampleListner());
TreeCache treecache = new TreeCacheFactory().createTreeCache(cache);
treecache.start();
but i can not do
- treecache.addListener i have to write cache.addListener(new xxx)
- cache.getCacheManager().getMembers(); => i have to write
CacheManager cm = null;
try {
cm = new DefaultCacheManager("config.xml");
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
Cache cache = cm.getCache();
System.out.println("COORDINATOR :" + cm.getCoordinator().toString());
System.out.println("MEMBERS :" + cm.getMembers());
System.out.println("CLUSTERNAME :" + cm.getClusterName());
System.out.println("VERSION :" + cache.getVersion());
I would like to know why you change this things ? because in jboss cache with a treecache i can do everything (addListener, getmembers, getcoordinator etc..).
after long time reading infinispan docs i saw cache.getCacheManager() but i do not have access to getmembers, getclustername.
So finally my question is : why i have to use CacheManager to access getCoordinator ? (on jboss cache i can use with treecache class).
thanks for your responses
Michael
-
4. try migration JBoss cache to infinispan
galder.zamarreno Jan 21, 2011 3:59 AM (in response to micou)TreeCache is just a facet of a cache in Infinispan and hence we limited to the functionality it provides. However, making TreeCache contain the methods you miss shouldn't be that difficult. Simply extend TreeCache to call it, JBossTreeCache and add the missing methods so that they delegate to Cache or CacheManager. The rest of methods could simply delegate to the underlying tree cache. It really is not that difficult