This content has been marked as final.
Show 1 reply
-
1. Re: TcpCacheServer and TreeCache
pnguyen45 May 19, 2006 2:37 PM (in response to pnguyen45)Got this working by sepearting the config. Below is the code:
Thread runner = new Thread()
{
public void run()
{
try {
System.out.println("Starting TcpCacheServer");
cache_server=new TcpCacheServer();
// configure the TcpCacheServer
config = new PropertyConfigurator();
config.configure(cache_server, "PrimaryCacheLoader.xml");
//Create new Cache
tree = new TreeCache();
// configure the new TreeCache
config.configure(tree, "PrimaryTreeCache.xml");
tree.startService();
//tree.addTreeCacheListener(listener);
cache_server.setCache(tree);
cache_server.createService();
cache_server.startService();
}
catch(Exception ex) {
ex.printStackTrace();
}
}
};