Package com.sun.enterprise.module

Examples of com.sun.enterprise.module.ModulesRegistry


        Thread.currentThread().setContextClassLoader(ecl);

        /*
         * Create a habitat that can load from the extension directory.
         */
        ModulesRegistry registry = new StaticModulesRegistry(ecl);
        serviceLocator = registry.createServiceLocator("default");
       
        classPath =
                SmartFile.sanitizePaths(System.getProperty("java.class.path"));
        className = AsadminMain.class.getName();

View Full Code Here


    public static Habitat getNewHabitat() {

        Properties p = new Properties();
        p.put(com.sun.enterprise.glassfish.bootstrap.Constants.INSTALL_ROOT_PROP_NAME, System.getProperty("java.io.tmpdir"));
        p.put(com.sun.enterprise.glassfish.bootstrap.Constants.INSTANCE_ROOT_PROP_NAME, System.getProperty("java.io.tmpdir"));
        ModulesRegistry registry = new StaticModulesRegistry(Utils.class.getClassLoader(), new StartupContext(p));
        return registry.createHabitat("default");
    }
View Full Code Here

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

        }

        // Step 2. Setup the module subsystem.
        Main main = new EmbeddedMain(cl);
        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}",
View Full Code Here

    public static Habitat getStaticHabitat() {
        if (defaultHabitat == null) {
            synchronized (staticLock) {
                if (defaultHabitat == null) {
                    ModulesRegistry registry = new StaticModulesRegistry(Globals.class.getClassLoader());
                    defaultHabitat = registry.createHabitat("default");
                }
            }
        }

        return defaultHabitat;
View Full Code Here

//        ctx.addBundleListener(this); // used for debugging purpose

        OSGiFactoryImpl.initialize(ctx);

        ModulesRegistry mr = createModulesRegistry();
        if (TracingUtilities.isEnabled())
            registerBundleDumper(mr);

        ctx.registerService(Main.class.getName(), this, null);
    }
View Full Code Here

        });
    }

    protected ModulesRegistry createModulesRegistry() {
        assert (mrReg == null);
        ModulesRegistry mr = AbstractFactory.getInstance().createModulesRegistry();
        mrReg = ctx.registerService(ModulesRegistry.class.getName(), mr, null);
        return mr;
    }
View Full Code Here

                }
            }
            destroyHabitat(habitatInfo.habitat);
        }

        ModulesRegistry mr = (ModulesRegistry) ctx.getService(mrReg.getReference());
        if (mr != null) {
            mr.shutdown();
            mr = null;
        }
//        ctx.removeBundleListener(this); // used for debugging only. see start method

    }
View Full Code Here

            return factory.createArchive(path);
        }
    }
   
    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

    static private boolean traverseAndFind(Module toTraverse, ModuleImpl toFind, Vector<Module> traversed) {

        traversed.add(toTraverse);
        for (ModuleDependency md : toTraverse.getModuleDefinition().getDependencies())  {
            ModulesRegistry registry = toTraverse.getRegistry();
            for (Module mod : registry.getModules()) {
                if (mod.getName().equals(md.getName())) {
                    if (mod!=null) {
                        if (mod.getName().equals(toFind.getName())) {
                            return true;
                        }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.module.ModulesRegistry

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.