1 17 18 19 20 package org.apache.fop.threading; 21 22 import java.io.File ; 23 24 import org.apache.avalon.framework.ExceptionUtil; 25 import org.apache.avalon.framework.configuration.Configuration; 26 import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder; 27 import org.apache.avalon.framework.container.ContainerUtil; 28 import org.apache.avalon.framework.logger.ConsoleLogger; 29 30 public class Main { 31 32 public static void main(String [] args) { 33 try { 34 File cfgFile = new File (args[0]); 36 DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder(); 37 Configuration cfg = builder.buildFromFile(cfgFile); 38 39 FOPTestbed testbed = new FOPTestbed(); 41 ContainerUtil.enableLogging(testbed, new ConsoleLogger(ConsoleLogger.LEVEL_INFO)); 42 ContainerUtil.configure(testbed, cfg); 43 ContainerUtil.initialize(testbed); 44 45 testbed.doStressTest(); 47 48 System.exit(0); 49 } catch (Exception e) { 50 System.err.println(ExceptionUtil.printStackTrace(e)); 51 System.exit(-1); 52 } 53 } 54 } | Popular Tags |