@Override public GlassFish newGlassFish(GlassFishProperties glassfishProperties) throws GlassFishException { return decoratedGfr.newGlassFish(glassfishProperties); } }
/** * Bootstrap GlassFish runtime based on runtime configuration passed in the bootstrapProperties object. * This is a convenience method. Calling this method is same as * calling {@link #bootstrap(BootstrapProperties , ClassLoader)} with null as second argument. * * @param bootstrapProperties BootstrapProperties used to setup the runtime * @throws GlassFishException */ public static GlassFishRuntime bootstrap(BootstrapProperties bootstrapProperties) throws GlassFishException { return bootstrap(bootstrapProperties, GlassFishRuntime.class.getClassLoader()); }
@Override public void shutdown() throws GlassFishException { decoratedGfr.shutdown(); }
private void launch() { try { GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish(glassfishProperties); glassfish.start(); glassfish.getDeployer().deploy(new File(inputWar), deployProperties.getDeployOptions()); } catch (Throwable th) { Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "Server was stopped.", th); System.exit(1); } }
runtime.shutdown(); // dispose of the old one runtime = GlassFishRuntime.bootstrap(bootstrapProperties); _logger.info("[EJBContainerProviderImpl] Using runtime class: " + runtime.getClass()); GlassFish server = runtime.newGlassFish(glassFishProperties); if (l.instance_root != null && !l.reuse_instance_location) {
/** * Bootstrap GlassFish runtime based on runtime configuration passed in the bootstrapProperties object. * Calling this method twice will throw a GlassFishException * * @param bootstrapProperties BootstrapProperties used to setup the runtime * @param cl ClassLoader used as parent loader by GlassFish modules. If null is passed, the class loader * of this class is used. * @return a bootstrapped runtime that can now be used to create new GlassFish instances * @throws GlassFishException */ public static GlassFishRuntime bootstrap(BootstrapProperties bootstrapProperties, ClassLoader cl) throws GlassFishException { return _bootstrap(bootstrapProperties, cl); }
public void launch(Properties ctx) throws Exception { addShutdownHook(); gfr = GlassFishRuntime.bootstrap(new BootstrapProperties(ctx), getClass().getClassLoader()); gf = gfr.newGlassFish(new GlassFishProperties(ctx)); if (Boolean.valueOf(Util.getPropertyOrSystemProperty(ctx, "GlassFish_Interactive", "false"))) { startConsole(); } else { gf.start(); } }
runtime.shutdown(); // dispose of the old one runtime = GlassFishRuntime.bootstrap(bootstrapProperties); GlassFish server = runtime.newGlassFish(glassFishProperties); if (l != null && !l.reuse_instance_location) {
/** * Bootstrap GlassFish runtime based on runtime configuration passed in the bootstrapProperties object. * Calling this method twice will throw a GlassFishException * * @param bootstrapProperties BootstrapProperties used to setup the runtime * @param cl ClassLoader used as parent loader by GlassFish modules. If null is passed, the class loader * of this class is used. * @return a bootstrapped runtime that can now be used to create new GlassFish instances * @throws GlassFishException */ public static GlassFishRuntime bootstrap(BootstrapProperties bootstrapProperties, ClassLoader cl) throws GlassFishException { return _bootstrap(bootstrapProperties, cl); }
public void launch(Properties ctx) throws Exception { addShutdownHook(); gfr = GlassFishRuntime.bootstrap(new BootstrapProperties(ctx), getClass().getClassLoader()); gf = gfr.newGlassFish(new GlassFishProperties(ctx)); if (Boolean.valueOf(Util.getPropertyOrSystemProperty(ctx, "GlassFish_Interactive", "false"))) { startConsole(); } else { gf.start(); } }
@Override public GlassFish newGlassFish(GlassFishProperties glassfishProperties) throws GlassFishException { return decoratedGfr.newGlassFish(glassfishProperties); } }
/** * Bootstrap GlassFish runtime based on runtime configuration passed in the bootstrapProperties object. * This is a convenience method. Calling this method is same as * calling {@link #bootstrap(BootstrapProperties , ClassLoader)} with null as second argument. * * @param bootstrapProperties BootstrapProperties used to setup the runtime * @throws GlassFishException */ public static GlassFishRuntime bootstrap(BootstrapProperties bootstrapProperties) throws GlassFishException { return bootstrap(bootstrapProperties, GlassFishRuntime.class.getClassLoader()); }
@Override public void shutdown() throws GlassFishException { decoratedGfr.shutdown(); }
public void start(BundleContext context) throws Exception { nonEmbedded = context.getProperty(Constants.BUILDER_NAME_PROPERTY) != null; if (nonEmbedded) { GlassFishRuntime embeddedGfr = new EmbeddedOSGiGlassFishRuntime(context); context.registerService(GlassFishRuntime.class.getName(), embeddedGfr, null); System.out.println("Registered " + embeddedGfr + " in service registry."); } else { Properties properties = prepareStartupContext(context); final BootstrapProperties bsProperties = new BootstrapProperties(properties); System.out.println(GlassFishRuntime.class + " is loaded by [" + GlassFishRuntime.class.getClassLoader() + "]"); GlassFishRuntime existingGfr = lookupGfr(context); if (existingGfr == null) { System.out.println("Bootstrapping a new GlassFishRuntime"); // Should we do the following in a separate thread? gfr = GlassFishRuntime.bootstrap(bsProperties, getClass().getClassLoader()); existingGfr = gfr; } else { System.out.println("Using existing GlassFishRuntime: [" + existingGfr + "]"); } gf = existingGfr.newGlassFish(new GlassFishProperties(properties)); gf.start(); } }
/** * Create a new instance of GlassFish with default {@link org.glassfish.embeddable.GlassFishProperties} * * @return New GlassFish instance. * @throws GlassFishException If at all fails to create a new GlassFish instance. */ public GlassFish newGlassFish() throws GlassFishException { return newGlassFish(new GlassFishProperties()); }
/** * Bootstrap a GlassFishRuntime with default {@link BootstrapProperties}. * * @return Bootstrapped GlassFishRuntime * @throws GlassFishException if the GlassFishRuntime is already bootstrapped. */ public static GlassFishRuntime bootstrap() throws GlassFishException { return bootstrap(new BootstrapProperties(), GlassFishRuntime.class.getClassLoader()); }
public void run() { try { gfr.shutdown(); } catch (Exception ex) { System.err.println("Error stopping framework: " + ex); ex.printStackTrace(); } } });
public void start(BundleContext context) throws Exception { nonEmbedded = context.getProperty(Constants.BUILDER_NAME_PROPERTY) != null; if (nonEmbedded) { GlassFishRuntime embeddedGfr = new EmbeddedOSGiGlassFishRuntime(context); context.registerService(GlassFishRuntime.class.getName(), embeddedGfr, null); System.out.println("Registered " + embeddedGfr + " in service registry."); } else { Properties properties = prepareStartupContext(context); final BootstrapProperties bsProperties = new BootstrapProperties(properties); System.out.println(GlassFishRuntime.class + " is loaded by [" + GlassFishRuntime.class.getClassLoader() + "]"); GlassFishRuntime existingGfr = lookupGfr(context); if (existingGfr == null) { System.out.println("Bootstrapping a new GlassFishRuntime"); // Should we do the following in a separate thread? gfr = GlassFishRuntime.bootstrap(bsProperties, getClass().getClassLoader()); existingGfr = gfr; } else { System.out.println("Using existing GlassFishRuntime: [" + existingGfr + "]"); } gf = existingGfr.newGlassFish(new GlassFishProperties(properties)); gf.start(); } }
/** * Create a new instance of GlassFish with default {@link org.glassfish.embeddable.GlassFishProperties} * * @return New GlassFish instance. * @throws GlassFishException If at all fails to create a new GlassFish instance. */ public GlassFish newGlassFish() throws GlassFishException { return newGlassFish(new GlassFishProperties()); }
/** * Bootstrap a GlassFishRuntime with default {@link BootstrapProperties}. * * @return Bootstrapped GlassFishRuntime * @throws GlassFishException if the GlassFishRuntime is already bootstrapped. */ public static GlassFishRuntime bootstrap() throws GlassFishException { return bootstrap(new BootstrapProperties(), GlassFishRuntime.class.getClassLoader()); }