public static void internalMain(Arguments arguments) throws Exception
{
/**
* This is a server, so get the server factory and a context
*/
SCServerFactory factory = ShopComCacheFactory.getServerFactory();
SCServerContext context = factory.newContext();
/**
* The context is where startup parameters are set. They must be
* set before the server is started
*/
context.port(arguments.portInt);
if ( arguments.monitorPortInt != 0 )
{
context.monitorPort(arguments.monitorPortInt);
}
if ( arguments.logPath != null )
{
context.logPath(new File(getFileFromPath(arguments.logPath), "log" + System.currentTimeMillis() + ".txt"));
}
/**
* This server will overflow objects to disk. It uses the included
* 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