public static Properties argsToMap(List<String>sargs) { ArgumentManager mgr = new ArgumentManager(sargs); return mgr.getArgs(); }
protected void launch(ModuleStartup startupCode, StartupContext context) throws BootException { startupCode.setStartupContext(context); startupCode.start(); }
public void run() { try { main.start(args); } catch (BootException e) { e.printStackTrace(); } catch (RuntimeException e) { e.printStackTrace(); } } };
final protected String startupArg(final String argName) { if (startupArgs == null) { if (startupContext != null) { startupArgs = startupContext.getArguments(); } else { startupArgs = new Properties(); // shouldn't happen } } return startupArgs.getProperty(argName); }
/** * We need to determine which jar file has been used to load this class * Using the getResourceURL we can get this information, after that, it is * just a bit of detective work to get the file path for the jar file. * * @return the path to the jar file containing this class. always returns * non-null. * * @throws BootException * If failed to determine the bootstrap file name. */ protected File getBootstrapFile() throws BootException { try { return Which.jarFile(getClass()); } catch (IOException e) { throw new BootException("Failed to get bootstrap path", e); } }
private static File findBootstrapFile() { try { return Which.jarFile(ASMain.class); } catch (IOException e) { throw new RuntimeException("Cannot get bootstrap path from " + ASMain.class + " class location, aborting"); } }
public synchronized void start() throws GlassFishException { if (status == Status.STARTED || status == Status.STARTING || status == Status.DISPOSED) { throw new IllegalStateException("Already in " + status + " state."); } status = Status.STARTING; gfKernel.start(); status = Status.STARTED; }
public synchronized void stop() throws GlassFishException { if (status == Status.STOPPED || status == Status.STOPPING || status == Status.DISPOSED) { throw new IllegalStateException("Already in " + status + " state."); } status = Status.STOPPING; gfKernel.stop(); status = Status.STOPPED; }
public void logMessage(Level level,String message) { LogRecord lr = new LogRecord(level,message); publish(lr); }
public static File getInstanceRoot(StartupContext sc) { return getInstanceRoot(sc.getArguments()); }
/** * We need to determine which jar file has been used to load this class * Using the getResourceURL we can get this information, after that, it is * just a bit of detective work to get the file path for the jar file. * * @return the path to the jar file containing this class. always returns * non-null. * * @throws BootException * If failed to determine the bootstrap file name. */ protected File getBootstrapFile() throws BootException { try { return Which.jarFile(getClass()); } catch (IOException e) { throw new BootException("Failed to get bootstrap path", e); } }
public static Properties argsToMap(String[] sargs) { ArgumentManager mgr = new ArgumentManager(sargs); return mgr.getArgs(); }
protected void launch(ModuleStartup startupCode, StartupContext context) throws BootException { startupCode.setStartupContext(context); startupCode.start(); }
public void run() { try { main.start(args); } catch (BootException e) { e.printStackTrace(); } catch (RuntimeException e) { e.printStackTrace(); } } };
private static File findBootstrapFile() { try { return Which.jarFile(ASMain.class); } catch (IOException e) { throw new RuntimeException("Cannot get bootstrap path from " + ASMain.class + " class location, aborting"); } }
public synchronized void start() throws GlassFishException { if (status == Status.STARTED || status == Status.STARTING || status == Status.DISPOSED) { throw new IllegalStateException("Already in " + status + " state."); } status = Status.STARTING; gfKernel.start(); status = Status.STARTED; }
public synchronized void stop() throws GlassFishException { if (status == Status.STOPPED || status == Status.STOPPING || status == Status.DISPOSED) { throw new IllegalStateException("Already in " + status + " state."); } status = Status.STOPPING; gfKernel.stop(); status = Status.STOPPED; }
public static Properties argsToMap(String[] sargs) { ArgumentManager mgr = new ArgumentManager(sargs); return mgr.getArgs(); }
public static Properties argsToMap(List<String>sargs) { ArgumentManager mgr = new ArgumentManager(sargs); return mgr.getArgs(); }