Package com.sun.enterprise.module.bootstrap

Examples of com.sun.enterprise.module.bootstrap.StartupContext


           
            config.commit();
           
            config = dcs.createDynamicConfiguration();
           
            StartupContext startupContext = new ACCStartupContext();
            AbstractActiveDescriptor<?> startupContextDescriptor = BuilderHelper.createConstantDescriptor(startupContext);
            startupContextDescriptor.addContractType(StartupContext.class);
            config.addActiveDescriptor(startupContextDescriptor);
           
            ModulesRegistry modulesRegistry = new StaticModulesRegistry(ACCModulesManager.class.getClassLoader());
View Full Code Here


        if (!RankedConfigBeanProxy.class.isAssignableFrom(extensionType)) {
            if (getExtension(extensionType, extensionOwner) != null) {
                return;
            }
        }
        StartupContext context = serviceLocator.getService(StartupContext.class);
        List<ConfigBeanDefaultValue> configBeanDefaultValueList =
                configModularityUtils.getDefaultConfigurations(extensionType, configModularityUtils.getRuntimeTypePrefix(context));
        configurationParser.parseAndSetConfigBean(configBeanDefaultValueList);
    }
View Full Code Here

            cloned.putAll(glassFishProperties.getProperties());

            final GlassFishProperties gfProps = new GlassFishProperties(cloned);
            setEnv(gfProps);

            final StartupContext startupContext = new StartupContext(gfProps.getProperties());
           
            ModulesRegistry modulesRegistry = SingleHK2Factory.getInstance().createModulesRegistry();

            ServiceLocator serviceLocator = main.createServiceLocator(modulesRegistry, startupContext, Arrays.asList((PopulatorPostProcessor)new EmbeddedInhabitantsParser(), new ContextDuplicatePostProcessor()), null);
View Full Code Here

    public synchronized GlassFish newGlassFish(GlassFishProperties gfProps) throws GlassFishException {
        try {
            // set env props before updating config, because configuration update may actually trigger
            // some code to be executed which may be depending on the environment variable values.
            setEnv(gfProps.getProperties());
            final StartupContext startupContext = new StartupContext(gfProps.getProperties());
            final ServiceTracker hk2Tracker = new ServiceTracker(getBundleContext(), Main.class.getName(), null);
            hk2Tracker.open();
            final Main main = (Main) hk2Tracker.waitForService(0);
            hk2Tracker.close();
            final ModulesRegistry mr = ModulesRegistry.class.cast(getBundleContext().getService(getBundleContext().getServiceReference(ModulesRegistry.class.getName())));
View Full Code Here

    public synchronized GlassFish newGlassFish(GlassFishProperties gfProps) throws GlassFishException {
        try {
            // set env props before updating config, because configuration update may actually trigger
            // some code to be executed which may be depending on the environment variable values.
            setEnv(gfProps.getProperties());
            final StartupContext startupContext = new StartupContext(gfProps.getProperties());
            final ServiceTracker hk2Tracker = new ServiceTracker(getBundleContext(), Main.class.getName(), null);
            hk2Tracker.open();
            final Main main = (Main) hk2Tracker.waitForService(0);
            hk2Tracker.close();
            final ModulesRegistry mr = ModulesRegistry.class.cast(getBundleContext().getService(getBundleContext().getServiceReference(ModulesRegistry.class.getName())));
View Full Code Here

            cloned.putAll(glassFishProperties.getProperties());

            final GlassFishProperties gfProps = new GlassFishProperties(cloned);
            setEnv(gfProps);

            final StartupContext startupContext = new StartupContext(gfProps.getProperties());
            ModulesRegistry modulesRegistry = AbstractFactory.getInstance().createModulesRegistry();
            final Habitat habitat = main.createHabitat(modulesRegistry, startupContext);
            final ModuleStartup gfKernel = main.findStartupService(modulesRegistry, habitat, null, startupContext);
            // create a new GlassFish instance
            GlassFishImpl gfImpl = new GlassFishImpl(gfKernel, habitat, gfProps.getProperties()) {
View Full Code Here

        if (!RankedConfigBeanProxy.class.isAssignableFrom(extensionType)) {
            if (getExtension(extensionType, extensionOwner) != null) {
                return;
            }
        }
        StartupContext context = serviceLocator.getService(StartupContext.class);
        List<ConfigBeanDefaultValue> configBeanDefaultValueList =
                configModularityUtils.getDefaultConfigurations(extensionType, configModularityUtils.getRuntimeTypePrefix(context));
        configurationParser.parseAndSetConfigBean(configBeanDefaultValueList);
    }
View Full Code Here

    public synchronized GlassFish newGlassFish(GlassFishProperties gfProps) throws GlassFishException {
        try {
            // set env props before updating config, because configuration update may actually trigger
            // some code to be executed which may be depending on the environment variable values.
            setEnv(gfProps.getProperties());
            final StartupContext startupContext = new StartupContext(gfProps.getProperties());
            final ServiceTracker hk2Tracker = new ServiceTracker(getBundleContext(), Main.class.getName(), null);
            hk2Tracker.open();
            final Main main = (Main) hk2Tracker.waitForService(0);
            hk2Tracker.close();
            final ModulesRegistry mr = ModulesRegistry.class.cast(getBundleContext().getService(getBundleContext().getServiceReference(ModulesRegistry.class.getName())));
View Full Code Here

    }

    @Override                        
    public Habitat createHabitat(String name) throws ComponentException {

        StartupContext sc = startupContext;
        Habitat habitat = super.newHabitat();

        if (startupContext==null) {
            sc = new StartupContext(new Properties());
        }
        super.createHabitat("default", habitat);
        habitat.add(Inhabitants.create(sc));
        return habitat;
    }
View Full Code Here

        return runtime;
    }

    static private ServiceLocator getHabitat() {
        ServiceLocator habitat = Globals.getStaticHabitat();
        StartupContext startupContext = new StartupContext();
        ServiceLocatorUtilities.addOneConstant(habitat, startupContext);
        ServiceLocatorUtilities.addOneConstant(habitat,
                new ProcessEnvironment(ProcessEnvironment.ProcessType.Other));

        return habitat;
View Full Code Here

TOP

Related Classes of com.sun.enterprise.module.bootstrap.StartupContext

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.