01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright
03: * notice. All rights reserved.
04: */
05: package com.tc.server;
06:
07: import com.tc.config.schema.setup.FatalIllegalConfigurationChangeHandler;
08: import com.tc.config.schema.setup.StandardTVSConfigurationSetupManagerFactory;
09: import com.tc.config.schema.setup.TVSConfigurationSetupManagerFactory;
10: import com.tc.lang.TCThreadGroup;
11: import com.tc.lang.ThrowableHandler;
12: import com.tc.logging.TCLogging;
13:
14: public class TCServerMain {
15:
16: public static void main(final String[] args) {
17: ThrowableHandler throwableHandler = new ThrowableHandler(
18: TCLogging.getLogger(TCServerMain.class));
19:
20: try {
21: TCThreadGroup threadGroup = new TCThreadGroup(
22: throwableHandler);
23:
24: TVSConfigurationSetupManagerFactory factory = new StandardTVSConfigurationSetupManagerFactory(
25: args, true,
26: new FatalIllegalConfigurationChangeHandler());
27: AbstractServerFactory serverFactory = AbstractServerFactory
28: .getFactory();
29: TCServer server = serverFactory.createServer(factory
30: .createL2TVSConfigurationSetupManager(null),
31: threadGroup);
32: server.start();
33:
34: } catch (Throwable t) {
35: throwableHandler.handleThrowable(Thread.currentThread(), t);
36: }
37: }
38: }
|