@Override public Status getStatus() throws GlassFishException { return decoratedGf.getStatus(); }
@Override public Status getStatus() throws GlassFishException { return decoratedGf.getStatus(); }
public void stop(BundleContext context) throws Exception { if (nonEmbedded) { System.out.println("We are in non-embedded mode, so " + context.getBundle() + " has nothing to do."); return; } try { // gf can be null - especially in non-embedded mode. if (gf != null && gf.getStatus() != GlassFish.Status.DISPOSED) { gf.dispose(); // dispose calls stop } } finally { gf = null; } if (gfr != null) { // gfr is non-null only if this activator has bootstrapped, else it's null. gfr.shutdown(); gfr = null; } }
public synchronized void shutdown() throws GlassFishException { // make a copy to avoid ConcurrentModificationException for (GlassFish gf : new ArrayList<GlassFish>(gfs)) { if (gf.getStatus() != GlassFish.Status.DISPOSED) { try { gf.dispose(); } catch (GlassFishException e) { e.printStackTrace(); } } } gfs.clear(); shutdownInternal(); System.out.println("Completed shutdown of GlassFish runtime"); }
public synchronized void shutdown() throws GlassFishException { // make a copy to avoid ConcurrentModificationException for (GlassFish gf : new ArrayList<GlassFish>(gfs)) { if (gf.getStatus() != GlassFish.Status.DISPOSED) { try { gf.dispose(); } catch (GlassFishException e) { e.printStackTrace(); } } } gfs.clear(); shutdownInternal(); System.out.println("Completed shutdown of GlassFish runtime"); }
/** * Starts the embedded server, opening ports, and running the startup * services. * * @throws LifecycleException if the server cannot be started propertly */ public synchronized void start() throws LifecycleException { if(glassfish != null) { try { if (glassfish.getStatus() != GlassFish.Status.STARTED) { glassfish.start(); } } catch (GlassFishException e) { throw new LifecycleException(e); // TODO(Sahoo): Proper Exception Handling } logger.finer("GlassFish has been started"); } }
public void stop(BundleContext context) throws Exception { if (nonEmbedded) { System.out.println("We are in non-embedded mode, so " + context.getBundle() + " has nothing to do."); return; } try { // gf can be null - especially in non-embedded mode. if (gf != null && gf.getStatus() != GlassFish.Status.DISPOSED) { gf.dispose(); // dispose calls stop } } finally { gf = null; } if (gfr != null) { // gfr is non-null only if this activator has bootstrapped, else it's null. gfr.shutdown(); gfr = null; } }
/** * Starts the embedded server, opening ports, and running the startup * services. * * @throws LifecycleException if the server cannot be started propertly */ public synchronized void start() throws LifecycleException { if(glassfish != null) { try { if (glassfish.getStatus() != GlassFish.Status.STARTED) { glassfish.start(); } } catch (GlassFishException e) { throw new LifecycleException(e); // TODO(Sahoo): Proper Exception Handling } logger.finer("GlassFish has been started"); } }
while ((status = gf.getStatus()) != GlassFish.Status.STARTED) { if (status == GlassFish.Status.DISPOSED) return; try {
System.out.println("command = " + command); if ("start".equalsIgnoreCase(command)) { if (gf.getStatus() != GlassFish.Status.STARTED || gf.getStatus() == GlassFish.Status.STOPPING || gf.getStatus() == GlassFish.Status.STARTING) gf.start(); else System.out.println("Already started or stopping or starting"); } else if ("stop".equalsIgnoreCase(command)) { if (gf.getStatus() != GlassFish.Status.STARTED) { System.out.println("GlassFish is not started yet. Please execute start first."); continue; if (gf.getStatus() != GlassFish.Status.STARTED) { System.out.println("GlassFish is not started yet. Please execute start first."); continue; System.out.println("Deployed = " + name); } else if (command.startsWith("undeploy")) { if (gf.getStatus() != GlassFish.Status.STARTED) { System.out.println("GlassFish is not started yet. Please execute start first."); continue; System.exit(0); } else { if (gf.getStatus() != GlassFish.Status.STARTED) { System.out.println("GlassFish is not started yet. Please execute start first."); continue;
System.out.println("command = " + command); if ("start".equalsIgnoreCase(command)) { if (gf.getStatus() != GlassFish.Status.STARTED || gf.getStatus() == GlassFish.Status.STOPPING || gf.getStatus() == GlassFish.Status.STARTING) gf.start(); else System.out.println("Already started or stopping or starting"); } else if ("stop".equalsIgnoreCase(command)) { if (gf.getStatus() != GlassFish.Status.STARTED) { System.out.println("GlassFish is not started yet. Please execute start first."); continue; if (gf.getStatus() != GlassFish.Status.STARTED) { System.out.println("GlassFish is not started yet. Please execute start first."); continue; System.out.println("Deployed = " + name); } else if (command.startsWith("undeploy")) { if (gf.getStatus() != GlassFish.Status.STARTED) { System.out.println("GlassFish is not started yet. Please execute start first."); continue; System.exit(0); } else { if (gf.getStatus() != GlassFish.Status.STARTED) { System.out.println("GlassFish is not started yet. Please execute start first."); continue;
_logger.info("[EJBContainerImpl] GlassFish status: " + server.getStatus()); if (app instanceof ScatteredArchive) { _logger.info("[EJBContainerImpl] Deploying as a ScatteredArchive");
"GlassFish Status = {1}", new Object[]{glassfish, glassfish.getStatus()}); } catch (Throwable ex) { throw new RuntimeException(ex);
"GlassFish Status = {1}", new Object[]{glassfish, glassfish.getStatus()}); } catch (Throwable ex) { throw new RuntimeException(ex);