Simply hibernate example:
One node contains HibernateCacheStore and other configuration
(hibernate.cfg.xml vs...)
I have created that node and read database and write to cache (It works as
it is) (cache name is "hibernateCache")
Now I have created another node which has default configuration. Then in the
main app just contains::
public static void printCache(IgniteCache igniteCache){
System.out.println("Print the all caches");
Iterator<Cache.Entry<Integer, Person>> cacheIterator =
igniteCache.iterator();
while (cacheIterator.hasNext()){
Cache.Entry cacheEntry = cacheIterator.next();
System.out.println("Key: " + cacheEntry.getKey() + ", value:" +
cacheEntry.getValue());
}
}
public static void main...(){
Ignite node = Ignition.start(defaultxmlpath)
IgniteCache cache = node.getOrCreateCache("hibernateCache");
System.out.println(cache.size());
printCache(cache);
}
even if I work on local mode(and server nodes become 2 when I run the other
node), I can not see the cache size on the screen and does not print the
cache. It just waiting!!!
Note that: I have tried peer class loading false and true, but nothing
changed.
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/