tags:

views:

31

answers:

0

I'm taking my first steps with JCS (Java caching system by Apache). I set up two remote cache clients in a cluster and wrote a simple cache client. Everything seems to work fine, except that the process never finishes.

Here's a minimal client:

cache.ccf:

jcs.default=RFailover
jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
jcs.default.cacheattributes.MaxObjects=0

jcs.auxiliary.RFailover=org.apache.jcs.auxiliary.remote.RemoteCacheFactory
jcs.auxiliary.RFailover.attributes=org.apache.jcs.auxiliary.remote.RemoteCacheAttributes
jcs.auxiliary.RFailover.attributes.RemoteTypeName=LOCAL
jcs.auxiliary.RFailover.attributes.FailoverServers=localhost:1101,localhost:1102
jcs.auxiliary.RFailover.attributes.GetOnly=false

test.java:

public static void main(String[] args) throws Exception {
    JCS cache = JCS.getInstance("someRegion");
}

That's it. I can put items and get item from the cache, and it works, bu whatever I do, the process always hangs after the last line of main.

From the debugger it seems that it is stuck on listening to RMI connections, but I'm not sure why that is.

I tried calling cache.dispose(), but it still hangs.

Any ideas?