Examples of ModulesRegistry


Examples of com.sun.enterprise.module.ModulesRegistry

            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

Examples of com.sun.enterprise.module.ModulesRegistry

//        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

Examples of com.sun.enterprise.module.ModulesRegistry

        });
    }

    protected ModulesRegistry createModulesRegistry() throws Exception {
        assert (mrReg == null);
        ModulesRegistry mr = AbstractFactory.getInstance().createModulesRegistry();

        String hk2RepositoryUris = ctx.getProperty(Constants.HK2_REPOSITORIES);

        if (hk2RepositoryUris != null) {
            for (String s : hk2RepositoryUris.split("\\s")) {
                URI repoURI = URI.create(s);
                File repoDir = new File(repoURI);
                OSGiDirectoryBasedRepository repo = new OSGiDirectoryBasedRepository(repoDir.getAbsolutePath(), repoDir);
                repo.initialize();
                mr.addRepository(repo);
            }
        }
        String osgiRepositoryUris = ctx.getProperty(Constants.OBR_REPOSITORIES);
        if (osgiRepositoryUris != null && mr instanceof OSGiObrModulesRegistryImpl) {
            OSGiObrModulesRegistryImpl mr1 = (OSGiObrModulesRegistryImpl) mr;
View Full Code Here

Examples of com.sun.enterprise.module.ModulesRegistry

                }
            }
            destroyHabitat(habitatInfo.serviceLocator);
        }

        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

Examples of com.sun.enterprise.module.ModulesRegistry

            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);

            final ModuleStartup gfKernel = main.findStartupService(modulesRegistry, serviceLocator, null, startupContext);
            // create a new GlassFish instance
View Full Code Here

Examples of com.sun.enterprise.module.ModulesRegistry

     * modules in the modules directory.
     */
    private static synchronized ServiceLocator getManHabitat() {
        if (manServiceLocator != null)
            return manServiceLocator;
        ModulesRegistry registry = new StaticModulesRegistry(getModuleClassLoader());
        manServiceLocator = registry.createServiceLocator("default");
        return manServiceLocator;
    }
View Full Code Here

Examples of com.sun.enterprise.module.ModulesRegistry

                    new PrivilegedAction() {
                        @Override
                        public Object run() {
                            try {
                                URLClassLoader pl = new URLClassLoader(getJars(ext));
                                ModulesRegistry registry = new StaticModulesRegistry(pl);
                                locator = registry.createServiceLocator("default");
                                return pl;
                            } catch (IOException ex) {
                                // any failure here is fatal
                                LOG.log(Level.SEVERE, strings.getLocalString("modules.class.loader.failed", "Failed to create a ClassLoader for modules directory."), ex);
                            }
View Full Code Here

Examples of com.sun.enterprise.module.ModulesRegistry

//        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

Examples of com.sun.enterprise.module.ModulesRegistry

        });
    }

    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

Examples of com.sun.enterprise.module.ModulesRegistry

                }
            }
            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
TOP
Copyright © 2018 www.massapi.com. 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.