1 5 package com.tc.server; 6 7 import com.tc.config.schema.setup.FatalIllegalConfigurationChangeHandler; 8 import com.tc.config.schema.setup.StandardTVSConfigurationSetupManagerFactory; 9 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(TCLogging.getLogger(TCServerMain.class)); 18 19 try { 20 TCThreadGroup threadGroup = new TCThreadGroup(throwableHandler); 21 22 TVSConfigurationSetupManagerFactory factory = new StandardTVSConfigurationSetupManagerFactory( 23 args, 24 true, 25 new FatalIllegalConfigurationChangeHandler()); 26 AbstractServerFactory serverFactory = AbstractServerFactory.getFactory(); 27 TCServer server = serverFactory.createServer(factory.createL2TVSConfigurationSetupManager(null), threadGroup); 28 server.start(); 29 30 } catch (Throwable t) { 31 throwableHandler.handleThrowable(Thread.currentThread(), t); 32 } 33 } 34 } 35 | Popular Tags |