Package org.jboss.modules

Examples of org.jboss.modules.ModuleIdentifier


    }

    private void addJSFAPI(String jsfVersion, ModuleSpecification moduleSpecification, ModuleLoader moduleLoader) {
        if (jsfVersion.equals(JsfVersionMarker.WAR_BUNDLES_JSF_IMPL)) return;

        ModuleIdentifier jsfModule = JSF_API;
        if (jsfVersion.equals(JsfVersionMarker.JSF_1_2)) jsfModule = JSF_1_2_API;
        moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, jsfModule, false, false, false, false));
    }
View Full Code Here


    }

    private void addJSFImpl(String jsfVersion, ModuleSpecification moduleSpecification, ModuleLoader moduleLoader) {
        if (jsfVersion.equals(JsfVersionMarker.WAR_BUNDLES_JSF_IMPL)) return;

        ModuleIdentifier jsfModule = null;
        if (jsfVersion.equals(JsfVersionMarker.JSF_1_2)) jsfModule = JSF_1_2_IMPL;
        if (jsfVersion.equals(JsfVersionMarker.JSF_2_0)) jsfModule = JSF_IMPL;
        if (jsfModule == null) {
            jsfModule = JSF_IMPL;
            WebLogger.WEB_LOGGER.unknownJSFVersion(jsfVersion, JsfVersionMarker.JSF_2_0);
View Full Code Here

        modules.add(module);
        notifyObservers(new ChangeEvent(ChangeType.MODULE, false, module.getIdentifier().toString()));
    }

    public OSGiModule removeModule(String id) {
        ModuleIdentifier identifier = ModuleIdentifier.fromString(id);
        synchronized (modules) {
            for (Iterator<OSGiModule> it = modules.iterator(); it.hasNext(); ) {
                OSGiModule module = it.next();
                if (module.getIdentifier().equals(identifier)) {
                    it.remove();
                    notifyObservers(new ChangeEvent(ChangeType.MODULE, true, identifier.toString()));
                    return module;
                }
            }
            return null;
        }
View Full Code Here

    final ModuleSpecification moduleSpecification = parent.getAttachment(Attachments.MODULE_SPECIFICATION);
    addSystemDependencies(moduleLoader, moduleSpecification);

    // install the pa-module service
    ModuleIdentifier identifyer = deploymentUnit.getAttachment(Attachments.MODULE_IDENTIFIER);
    String moduleName = identifyer.toString();

    ProcessApplicationModuleService processApplicationModuleService = new ProcessApplicationModuleService();
    ServiceName serviceName = ServiceNames.forProcessApplicationModuleService(moduleName);

    phaseContext.getServiceTarget()
View Full Code Here

    static ModuleClassLoader getModuleClassLoader(final String moduleSpec) throws ModuleLoadException {
        try {
            return AccessController.doPrivileged(new PrivilegedExceptionAction<ModuleClassLoader>() {
                public ModuleClassLoader run() throws ModuleLoadException {
                    ModuleLoader loader = Module.getCurrentModuleLoader();
                    ModuleIdentifier identifier = ModuleIdentifier.fromString(moduleSpec);
                    return loader.loadModule(identifier).getClassLoader();
                }
            });
        } catch (PrivilegedActionException pae) {
            throw new ModuleLoadException(pae);
View Full Code Here

    static ModuleClassLoader getModuleClassLoader() throws ModuleLoadException {
        try {
            return AccessController.doPrivileged(new PrivilegedExceptionAction<ModuleClassLoader>() {
                public ModuleClassLoader run() throws ModuleLoadException {
                    ModuleLoader loader = Module.getCurrentModuleLoader();
                    ModuleIdentifier identifier = ModuleIdentifier.create("org.jboss.as.security", "main");
                    return loader.loadModule(identifier).getClassLoader();
                }
            });
        } catch (PrivilegedActionException pae) {
            throw new ModuleLoadException(pae);
View Full Code Here

    static ModuleClassLoader getModuleClassLoader(final String moduleSpec) throws ModuleLoadException {
        try {
            return AccessController.doPrivileged(new PrivilegedExceptionAction<ModuleClassLoader>() {
                public ModuleClassLoader run() throws ModuleLoadException {
                    ModuleLoader loader = Module.getCurrentModuleLoader();
                    ModuleIdentifier identifier = ModuleIdentifier.fromString(moduleSpec);
                    return loader.loadModule(identifier).getClassLoader();
                }
            });
        } catch (PrivilegedActionException pae) {
            throw new ModuleLoadException(pae);
View Full Code Here

                if (name == null) {
                    classLoader = Module.class.getClassLoader();
                    className = (String) unmarshaller.readObject();
                } else {
                    final String slot = (String) unmarshaller.readObject();
                    final ModuleIdentifier identifier = ModuleIdentifier.create(name, slot);
                    className = (String) unmarshaller.readObject();
                    try {
                        classLoader = moduleLoader.loadModule(identifier).getClassLoader();
                    } catch (ModuleLoadException e) {
                        final InvalidClassException ce = new InvalidClassException(className, "Module load failed");
                        ce.initCause(e);
                        throw ce;
                    }
                }
                return Class.forName(className, false, classLoader);
            }
            case 1: {
                final String name = (String) unmarshaller.readObject();
                final ClassLoader classLoader;
                if (name == null) {
                    classLoader = Module.class.getClassLoader();
                } else {
                    final String slot = (String) unmarshaller.readObject();
                    final ModuleIdentifier identifier = ModuleIdentifier.create(name, slot);
                    final Module module;
                    try {
                        module = moduleLoader.loadModule(identifier);
                    } catch (ModuleLoadException e) {
                        final InvalidClassException ce = new InvalidClassException("Module load failed");
View Full Code Here

            marshaller.write(0);
            final Module module = Module.forClass(clazz);
            if (module == null) {
                marshaller.writeObject(null);
            } else {
                final ModuleIdentifier identifier = module.getIdentifier();
                marshaller.writeObject(identifier.getName());
                marshaller.writeObject(identifier.getSlot());
            }
            marshaller.writeObject(clazz.getName());
        }
View Full Code Here

            marshaller.write(1);
            final Module module = Module.forClass(clazz);
            if (module == null) {
                marshaller.writeObject(null);
            } else {
                final ModuleIdentifier identifier = module.getIdentifier();
                marshaller.writeObject(identifier.getName());
                marshaller.writeObject(identifier.getSlot());
            }
            final Class<?>[] interfaces = clazz.getInterfaces();
            marshaller.writeInt(interfaces.length);
            for (Class<?> interfaze : interfaces) {
                marshaller.writeObject(interfaze.getName());
View Full Code Here

TOP

Related Classes of org.jboss.modules.ModuleIdentifier

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.