/** * Main entry-point. * * @param args Ignored. * @throws Exception if an error occurs. */ public static void main(String... args) throws Exception { if (System.getProperty("boot.module.loader") == null) { System.setProperty("boot.module.loader", "org.wildfly.swarm.bootstrap.modules.BootModuleLoader"); } Module bootstrap = Module.getBootModuleLoader().loadModule(ModuleIdentifier.create("swarm.application")); ServiceLoader<ContainerFactory> factory = bootstrap.loadService(ContainerFactory.class); Iterator<ContainerFactory> factoryIter = factory.iterator(); if (!factoryIter.hasNext()) { simpleMain(args); } else { factoryMain(factoryIter.next(), args); } }
/** Main entry-point. * * @param args Ignored. * @throws Exception if an error occurs. */ public static void main(String... args) throws Exception { if ( System.getProperty( "boot.module.loader" ) == null ) { System.setProperty("boot.module.loader", "org.wildfly.swarm.bootstrap.modules.BootModuleLoader" ); } Module bootstrap = Module.getBootModuleLoader().loadModule(ModuleIdentifier.create("swarm.application")); ServiceLoader<ContainerFactory> factory = bootstrap.loadService(ContainerFactory.class); Iterator<ContainerFactory> factoryIter = factory.iterator(); if ( ! factoryIter.hasNext() ) { simpleMain( args ); } else { factoryMain( factoryIter.next(), args ); } }
/** * Main entry-point. * * @param args Ignored. * @throws Exception if an error occurs. */ public static void main(String... args) throws Exception { if (System.getProperty("boot.module.loader") == null) { System.setProperty("boot.module.loader", "org.wildfly.swarm.bootstrap.modules.BootModuleLoader"); } Module bootstrap = Module.getBootModuleLoader().loadModule(ModuleIdentifier.create("swarm.application")); ServiceLoader<ContainerFactory> factory = bootstrap.loadService(ContainerFactory.class); Iterator<ContainerFactory> factoryIter = factory.iterator(); if (!factoryIter.hasNext()) { simpleMain(args); } else { factoryMain(factoryIter.next(), args); } }