Package com.sun.enterprise.module.bootstrap

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


    private void prepareHabitat() {
        ModulesRegistry registry = new StaticModulesRegistry(getClass().getClassLoader());
        ServiceLocator serviceLocator = registry.createServiceLocator("default");
        habitat = serviceLocator.getService(ServiceLocator.class);

        StartupContext startupContext = new StartupContext();
        ServiceLocatorUtilities.addOneConstant(habitat, startupContext);
        ServiceLocatorUtilities.addOneConstant(habitat, new ProcessEnvironment(ProcessEnvironment.ProcessType.Other));
    }
View Full Code Here


        return commonClassPath;
    }

    private List<File> findDerbyClient() {
        final String DERBY_HOME_PROP = "AS_DERBY_INSTALL";
        StartupContext startupContext = env.getStartupContext();
    Properties arguments = null;
   
    if (startupContext != null) {
      arguments = startupContext.getArguments();
    }
   
    String derbyHome = null;
   
    if (arguments != null) {
View Full Code Here

    @Override
    public ServiceLocator createServiceLocator(String name) throws MultiException {
        ServiceLocator serviceLocator = super.createServiceLocator(name);

        StartupContext sc = startupContext;

        if (startupContext==null) {
            sc = new StartupContext(new Properties());
        }

        DynamicConfigurationService dcs = serviceLocator.getService(DynamicConfigurationService.class);
        DynamicConfiguration config = dcs.createDynamicConfiguration();
        config.bind(BuilderHelper.createConstantDescriptor(sc));
View Full Code Here

             * Remove any already-loaded startup context so we can replace it
             * with the ACC one.
             */
            habitat.removeAllByType(StartupContext.class);
           
            StartupContext startupContext = new ACCStartupContext();
            habitat.add(new ExistingSingletonInhabitant(StartupContext.class, startupContext));
            /*
             * Following the example from AppServerStartup, remove any
             * pre-loaded lazy inhabitant for ProcessEnvironment that exists
             * from HK2's scan for services.  Then add in
View Full Code Here

        return runtime;
    }

    static private Habitat getHabitat() {
        Habitat habitat = Globals.getStaticHabitat();
        StartupContext startupContext = new StartupContext();
        habitat.add(new ExistingSingletonInhabitant(startupContext));

        habitat.addComponent(null, new ProcessEnvironment(ProcessEnvironment.ProcessType.Other));
        return habitat;
    }
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

            cloned.putAll(glassFishProperties.getProperties());

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

            final StartupContext startupContext = new StartupContext(gfProps.getProperties());
           
            ModulesRegistry modulesRegistry = SingleHK2Factory.getInstance().createModulesRegistry();
           
            Binder postProcessorBinder = new Binder() {
View Full Code Here

        return null;
    }


    protected <U extends ConfigBeanProxy> void addConfigBeanFor(Class<U> extensionType) {
        StartupContext context = serviceLocator.getService(StartupContext.class);
        List<ConfigBeanDefaultValue> configBeanDefaultValueList =
                configModularityUtils.getDefaultConfigurations(extensionType, configModularityUtils.getRuntimeTypePrefix(context));
        configurationParser.parseAndSetConfigBean(configBeanDefaultValueList);
    }
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.