package org.jboss.test.cache.perf.basic;
import org.jboss.cache.PropertyConfigurator;
import org.jboss.cache.TreeCache;
import java.io.InputStreamReader;
public class Server
{
TreeCache cache_;
void initCach() throws Exception
{
cache_ = new TreeCache();
PropertyConfigurator config = new PropertyConfigurator();
config.configure(cache_, "META-INF/replSync-service.xml"); cache_.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
cache_.startService();
}
void destroyCache() throws Exception
{
cache_.stopService();
cache_ = null;
}
TreeCache getCache()
{
return cache_;
}
public static void main(String[] args) throws Exception
{
Server server = new Server();
server.initCach();
boolean isYes = true;
InputStreamReader reader = new InputStreamReader(System.in);
while (isYes) {
System.out.println("To abort hit cntrl-c");
try {
Thread.sleep(10000);
} catch (Exception ex) {
}
;
}
server.destroyCache();
}
}