Hi,
I'm considering using JCS 1.3 for a distributed registry in a Mobile
Adhoc Network (MANET), with the following requirements:
1) No central server
2) More than one JVM per ip address
There may be more, but those are the ones that I think cause the most
trouble. So the first question: Can JCS do this (particularly 2)? I've
looked at the UDP discovery and Lateral TCP, which together suggest that
it can.
Next, I've tried to build a simple program that creates a cache, but it
throws an exception about loading the config file....
./dsm-jcs.ccf exists.
Jun 9, 2011 9:26:38 AM org.apache.jcs.engine.control.CompositeCacheManager
getUnconfiguredInstance
INFO: Instance is null, creating with provided config
Jun 9, 2011 9:26:38 AM org.apache.jcs.engine.control.CompositeCacheManager
configure
INFO: Creating cache manager from config file: ./dsm-jcs.ccf
Jun 9, 2011 9:26:38 AM org.apache.jcs.engine.control.CompositeCacheManager
configure
SEVERE: Failed to load properties for name [./dsm-jcs.ccf]
Exception in thread "main" java.lang.IllegalStateException: Failed to load
properties for name [./dsm-jcs.ccf]
at org.apache.jcs.engine.control.CompositeCacheManager.configure(
CompositeCacheManager.java:242)
at org.apache.jcs.JCS.ensureCacheManager(JCS.java:102)
at org.apache.jcs.JCS.getInstance(JCS.java:64)
at Anything.main(Anything.java:21)
I'm running this from within Eclipse and the code is as follows:
public static void main(String argv[]) throws CacheException {
String cfg = "./dsm-jcs.ccf";
File f = new File(cfg);
if (f.exists())
System.err.println(cfg + " exists.");
else
System.err.println(cfg + " does NOT exist.");
JCS.setConfigFilename("./dsm-jcs.ccf");
JCS jcs = JCS.getInstance("DSM");
jcs.put("me", "here");
}
with ./dsm-jcs.ccf file located in the Eclipse project directory (where
the main() is being run).
Thanks in advance for you help.
David Wood
Computing Systems for Wireless Networks
IBM TJ Watson Research Center
[email protected]
914-784-5123 (office), 914-396-6515 (mobile)