* CCDB2 package to do this
*/
SCStorage db = CCDB2StorageFactory.create(new CCDB2Parameters());
db.open(getFileFromPath(arguments.dbPath));
/**
* Everything's set up, we can now create the server
*/
final SCServer server = factory.newServer(context, db);
/**
* Set up a hook to handle CTRL-C shutdown requests
*/
Thread hook = new Thread
(
new Runnable()
{
@Override
public void run()
{
System.out.println("Shutting down...");
server.shutdown();
}
}
);
hook.setDaemon(true);
Runtime.getRuntime().addShutdownHook(hook);
/**
* sleep until the server process is done
*/
server.join();
System.out.println("Done.");
}