Package com.sun.enterprise.module

Examples of com.sun.enterprise.module.Module


                "com.sun.faces.spi.InjectionProvider");
        } catch (ClassNotFoundException ignored) {
        }

        URI[] uris = null;
        Module m = null;
        if (jsfImplClass != null) {
            m = registry.find(jsfImplClass);
        }
        if (m != null) {
            uris = m.getModuleDefinition().getLocations();
        } else {
            ClassLoader classLoader = getClass().getClassLoader();
            if (classLoader instanceof URLClassLoader) {
                URL[] urls = ((URLClassLoader)classLoader).getURLs();
                if (urls != null && urls.length > 0) {
View Full Code Here


        /*
         * JSP caching has been enabled
         */
        Class jspCachingImplClass = CacheTag.class;
        URI[] uris = null;
        Module m = null;
        if (jspCachingImplClass != null) {
            m = registry.find(jspCachingImplClass);
        }
        if (m != null) {
            uris = m.getModuleDefinition().getLocations();
        } else {
            ClassLoader classLoader = getClass().getClassLoader();
            if (classLoader instanceof URLClassLoader) {
                URL[] urls = ((URLClassLoader)classLoader).getURLs();
                if (urls != null && urls.length > 0) {
View Full Code Here

                if (!name.startsWith("java.")) { // java classes always come from parent
                    try {
                        c = apiModuleLoader.loadClass(name); // we ignore the resolution flag
                    } catch (ClassNotFoundException cnfe) {
                        // punch in. find the provider class, no matter where we are.
                        Module m = mr.getProvidingModule(name);
                        if (m != null) {
                            if(select(m)) {
                                return m.getClassLoader().loadClass(name); // abort search if we fail to load.
                            } else {
                                logger.logp(Level.FINE, "APIClassLoaderServiceImpl$APIClassLoader", "loadClass",
                                        "Skipping loading {0} from module {1} as this module is not yet resolved.",
                                        new Object[]{name, m});
                            }
View Full Code Here

        }
    }

    @Override
    public Module find(Class clazz) {
        Module m = super.find(clazz);
        // all modules can load all classes
        if (m == null)
            return modules.get(0);
        return m;
    }
View Full Code Here

        /*
         * JSP caching has been enabled
         */
        Class jspCachingImplClass = CacheTag.class;
        URI[] uris = null;
        Module m = null;
        if (jspCachingImplClass != null) {
            m = registry.find(jspCachingImplClass);
        }
        if (m != null) {
            uris = m.getModuleDefinition().getLocations();
        } else {
            ClassLoader classLoader = getClass().getClassLoader();
            if (classLoader instanceof URLClassLoader) {
                URL[] urls = ((URLClassLoader)classLoader).getURLs();
                if (urls != null && urls.length > 0) {
View Full Code Here

     * @param module the module instance
     */
    public void start(Module module) {
  
        try {
            final Module myModule = module;
            Thread thread = new Thread() {
                public void run() {
                    try {
                        try {                    
                            Class driverClass = myModule.getClassLoader().loadClass("org.apache.derby.jdbc.EmbeddedDriver");
                            myModule.setSticky(true);
                            driverClass.newInstance();
                        } catch(ClassNotFoundException e) {
                            LogHelper.getDefaultLogger().log(Level.SEVERE, "Cannot load Derby Driver ",e);
                        } catch(java.lang.InstantiationException e) {
                            LogHelper.getDefaultLogger().log(Level.SEVERE, "Cannot instantiate Derby Driver", e);
View Full Code Here

    public Module makeModuleFor(String name, String version) throws ResolveError {
        return makeModuleFor(name, version, true);
    }

    public Module makeModuleFor(String name, String version, boolean resolve) throws ResolveError {
        Module module;
               
        if(parent!=null) {
            module = parent.makeModuleFor(name,version, resolve);
            if(module!=null)        return module;
        }
       
        module = modules.get(AbstractFactory.getInstance().createModuleId(name, version));
        if (module == null && version == null) {
            Collection<Module> matchingModules = getModules(name);
            if (!matchingModules.isEmpty()) {
                module = matchingModules.iterator().next();
            }
        }
        if (module==null) {
            module = loadFromRepository(name, version);
            if (module!=null) {
                add(module);
            }
        }
        if (module!=null && resolve) {
            try {
                module.resolve();
            } catch(Throwable e) {
                module.uninstall();
                throw new ResolveError(e);
            }
        }
        return module;
    }
View Full Code Here

     * name or null if not found.
     * @throws ResolveError if the module dependencies cannot be resolved
     */
    public Module makeModuleFor(String packageName) throws ResolveError {
        if(parent!=null) {
            Module m = parent.makeModuleFor(packageName);
            if(m!=null)     return m;
        }

        for (Module module : modules.values()) {
            String[] exportedPkgs = module.getModuleDefinition().getPublicInterfaces();
View Full Code Here

        sortedKeys.addAll(keys);
        for (Integer key : sortedKeys) {
            Repository repo = repos.get(key);
            for (ModuleDefinition moduleDef : repo.findAll()) {
                if (modules.get(AbstractFactory.getInstance().createModuleId(moduleDef)) == null) {
                    Module newModule = newModule(moduleDef);
                    if (newModule != null) {
                        // When some module can't get installed,
                        // don't halt proceeding, instead continue
                        add(newModule);
                        // don't resolve such modules, we just want to know about them
View Full Code Here

 
        // house keeping...
        remove(service);
        ModuleDefinition info = service.getModuleDefinition();
       
        Module newService = newModule(info);
       
        // store it
        add(newService);
    }  
View Full Code Here

TOP

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

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.