Package org.glassfish.embeddable

Examples of org.glassfish.embeddable.GlassFishRuntime


    }

    public GlassFishRuntime build(BootstrapProperties bsProps) throws GlassFishException {
        configureBundles(bsProps);
        provisionBundles(bsProps);
        GlassFishRuntime gfr = new EmbeddedOSGiGlassFishRuntime(getBundleContext());
        getBundleContext().registerService(GlassFishRuntime.class.getName(), gfr, bsProps.getProperties());
        return gfr;
    }
View Full Code Here


    private GlassFishRuntime getGlassFishRuntime() throws GlassFishException {
        final ServiceReference reference =
                framework.getBundleContext().getServiceReference(GlassFishRuntime.class.getName());
        if (reference != null) {
            GlassFishRuntime embeddedGfr = (GlassFishRuntime) framework.getBundleContext().getService(reference);
            return new OSGiGlassFishRuntime(embeddedGfr, framework);
        }
        throw new GlassFishException("No GlassFishRuntime available");
    }
View Full Code Here

        SingleHK2Factory.initialize(cl);
        ModulesRegistry modulesRegistry = AbstractFactory.getInstance().createModulesRegistry();
        modulesRegistry.setParentClassLoader(cl);

        // Step 3. Create NonOSGIGlassFishRuntime
        GlassFishRuntime glassFishRuntime = new StaticGlassFishRuntime(main);
        logger.logp(Level.FINER, getClass().getName(), "build",
                "Created GlassFishRuntime {0} with InstallRoot {1}, Bootstrap Options {2}",
                new Object[]{glassFishRuntime, installRoot, bsProps});
        return glassFishRuntime;
    }
View Full Code Here

    }

    public GlassFishRuntime build(BootstrapProperties bsProps) throws GlassFishException {
        configureBundles(bsProps);
        provisionBundles(bsProps);
        GlassFishRuntime gfr = new EmbeddedOSGiGlassFishRuntime();
        getBundleContext().registerService(GlassFishRuntime.class.getName(), gfr, bsProps.getProperties());
        return gfr;
    }
View Full Code Here

    private GlassFishRuntime getGlassFishRuntime() throws GlassFishException {
        final ServiceReference reference =
                framework.getBundleContext().getServiceReference(GlassFishRuntime.class.getName());
        if (reference != null) {
            GlassFishRuntime gfr = (GlassFishRuntime) framework.getBundleContext().getService(reference);
            return gfr;
        }
        throw new GlassFishException("No GlassFishRuntime available");
    }
View Full Code Here

        SingleHK2Factory.initialize(cl);
        ModulesRegistry modulesRegistry = AbstractFactory.getInstance().createModulesRegistry();
        modulesRegistry.setParentClassLoader(cl);

        // Step 3. Create NonOSGIGlassFishRuntime
        GlassFishRuntime glassFishRuntime = new StaticGlassFishRuntime(main);
        logger.logp(Level.FINER, getClass().getName(), "build",
                "Created GlassFishRuntime {0} with InstallRoot {1}, Bootstrap Options {2}",
                new Object[]{glassFishRuntime, installRoot, bsProps});
        return glassFishRuntime;
    }
View Full Code Here

        // for each module implementing the @Contract DomainInitializer, extract
        // the initial domain.xml and insert it into the existing domain.xml

        BootstrapProperties bootstrapProperties = new BootstrapProperties();
        bootstrapProperties.setInstallRoot(domainConfig.getInstallRoot());
        GlassFishRuntime runtime = GlassFishRuntime.bootstrap(bootstrapProperties);

        File domDir = new File(domainConfig.getDomainRoot(),
                domainConfig.getDomainName());
        File configDir = new File(domDir, "config");
        GlassFishProperties glassFishProperties = new GlassFishProperties();
        glassFishProperties.setConfigFileURI(new File(configDir,
                "domain.xml").toURI().toString());
        glassFishProperties.setConfigFileReadOnly(false);
        glassFishProperties.setProperty(StartupContext.STARTUP_MODULESTARTUP_NAME,
                "DomainCreation");
        glassFishProperties.setProperty(SystemPropertyConstants.INSTANCE_ROOT_PROPERTY,
                domDir.getAbsolutePath());
        glassFishProperties.setProperty("-domain", domainConfig.getDomainName());

        GlassFish glassfish = runtime.newGlassFish(glassFishProperties);
        glassfish.start();

        // Will always need DAS's name & config. No harm using the name 'server'
        // to fetch <server-config>
        com.sun.enterprise.config.serverbeans.Server serverConfig =
View Full Code Here

        SingleHK2Factory.initialize(cl);
        ModulesRegistry modulesRegistry = AbstractFactory.getInstance().createModulesRegistry();
        modulesRegistry.setParentClassLoader(cl);

        // Step 3. Create NonOSGIGlassFishRuntime
        GlassFishRuntime glassFishRuntime = new StaticGlassFishRuntime(main);
        logger.logp(Level.FINER, getClass().getName(), "build",
                "Created GlassFishRuntime {0} with InstallRoot {1}, Bootstrap Options {2}",
                new Object[]{glassFishRuntime, installRoot, bsProps});
        return glassFishRuntime;
    }
View Full Code Here

        // for each module implementing the @Contract DomainInitializer, extract
        // the initial domain.xml and insert it into the existing domain.xml

        BootstrapProperties bootstrapProperties = new BootstrapProperties();
        bootstrapProperties.setInstallRoot(domainConfig.getInstallRoot());
        GlassFishRuntime runtime = GlassFishRuntime.bootstrap(bootstrapProperties);

        File domDir = new File(domainConfig.getDomainRoot(),
                domainConfig.getDomainName());
        File configDir = new File(domDir, "config");
        GlassFishProperties glassFishProperties = new GlassFishProperties();
        glassFishProperties.setConfigFileURI(new File(configDir,
                "domain.xml").toURI().toString());
        glassFishProperties.setConfigFileReadOnly(false);
        glassFishProperties.setProperty(StartupContext.STARTUP_MODULESTARTUP_NAME,
                "DomainCreation");
        glassFishProperties.setProperty(SystemPropertyConstants.INSTANCE_ROOT_PROPERTY,
                domDir.getAbsolutePath());
        glassFishProperties.setProperty("-domain", domainConfig.getDomainName());

        GlassFish glassfish = runtime.newGlassFish(glassFishProperties);
        glassfish.start();

        // Will always need DAS's name & config. No harm using the name 'server'
        // to fetch <server-config>
        com.sun.enterprise.config.serverbeans.Server serverConfig =
View Full Code Here

        // for each module implementing the @Contract DomainInitializer, extract
        // the initial domain.xml and insert it into the existing domain.xml

        BootstrapProperties bootstrapProperties = new BootstrapProperties();
        bootstrapProperties.setInstallRoot(domainConfig.getInstallRoot());
        GlassFishRuntime runtime = GlassFishRuntime.bootstrap(bootstrapProperties);

        File domDir = new File(domainConfig.getDomainRoot(),
                domainConfig.getDomainName());
        File configDir = new File(domDir, "config");
        GlassFishProperties glassFishProperties = new GlassFishProperties();
        glassFishProperties.setConfigFileURI(new File(configDir,
                "domain.xml").toURI().toString());
        glassFishProperties.setConfigFileReadOnly(false);
        glassFishProperties.setProperty(StartupContext.STARTUP_MODULESTARTUP_NAME,
                "DomainCreation");
        glassFishProperties.setProperty(SystemPropertyConstants.INSTANCE_ROOT_PROPERTY,
                domDir.getAbsolutePath());
        glassFishProperties.setProperty("-domain", domainConfig.getDomainName());

        GlassFish glassfish = runtime.newGlassFish(glassFishProperties);
        glassfish.start();

        // Will always need DAS's name & config. No harm using the name 'server'
        // to fetch <server-config>
        com.sun.enterprise.config.serverbeans.Server serverConfig =
View Full Code Here

TOP

Related Classes of org.glassfish.embeddable.GlassFishRuntime

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.