Examples of ModuleIdentifier


Examples of org.jboss.modules.ModuleIdentifier

        final String xaDataSourceClassName = operation.hasDefined(DRIVER_XA_DATASOURCE_CLASS_NAME.getName()) ? operation.get(
                DRIVER_XA_DATASOURCE_CLASS_NAME.getName()).asString() : null;

        final ServiceTarget target = context.getServiceTarget();

        final ModuleIdentifier moduleId;
        final Module module;
        String slot = null;
        if (moduleName.contains(":")) {
            slot = moduleName.substring(moduleName.indexOf(":") + 1);
            moduleName = moduleName.substring(0, moduleName.indexOf(":"));
View Full Code Here

Examples of org.jboss.modules.ModuleIdentifier

    public void stop(HttpServer httpServer) {
        httpServer.removeContext(context);
    }

    protected static ClassLoader getClassLoader(final String module, final String slot) throws ModuleLoadException {
        ModuleIdentifier id = ModuleIdentifier.create(module, slot);
        ClassLoader cl = Module.getCallerModuleLoader().loadModule(id).getClassLoader();

        return cl;
    }
View Full Code Here

Examples of org.jboss.modules.ModuleIdentifier

    public Collection<Capability> findProviders(Requirement req) {
        String namespace = req.getNamespace();
        List<Capability> result = new ArrayList<Capability>();
        if (MODULE_IDENTITY_NAMESPACE.equals(namespace)) {
            String strval = (String) req.getAttributes().get(MODULE_IDENTITY_NAMESPACE);
            ModuleIdentifier moduleIdentifier = ModuleIdentifier.fromString(strval);
            try {
                File contentFile = getRepositoryEntry(bundlesDir, moduleIdentifier);
                if (contentFile != null) {
                    URL baseURL = bundlesDir.toURI().toURL();
                    String contentPath = contentFile.toURI().toURL().toExternalForm();
View Full Code Here

Examples of org.jboss.modules.ModuleIdentifier

    /**
     * Add a {@link ModuleSpec} for and OSGi module as a service that can later be looked up by the {@link ServiceModuleLoader}
     */
    @Override
    public void addModule(final ModuleSpec moduleSpec) {
        ModuleIdentifier identifier = moduleSpec.getModuleIdentifier();
        ROOT_LOGGER.debugf("Add module spec to loader: %s", identifier);

        ServiceName moduleSpecName = ServiceModuleLoader.moduleSpecServiceName(identifier);
        serviceTarget.addService(moduleSpecName, new ValueService<ModuleSpec>(new ImmediateValue<ModuleSpec>(moduleSpec))).install();
    }
View Full Code Here

Examples of org.jboss.modules.ModuleIdentifier

        int revision = moduleId.getRevision();
        if (revision > 0)
            slot += "-rev" + revision;

        String name = ServiceModuleLoader.MODULE_PREFIX + moduleId.getName();
        ModuleIdentifier identifier = ModuleIdentifier.create(name, slot);
        resModule.addAttachment(ModuleIdentifier.class, identifier);

        return identifier;
    }
View Full Code Here

Examples of org.jboss.modules.ModuleIdentifier

   {
      ServiceTarget serviceTarget = context.getServiceTarget();
      EchoInvokerService.addService(serviceTarget);

      ModuleClassLoader classLoader = (ModuleClassLoader)getClass().getClassLoader();
      ModuleIdentifier identifier = classLoader.getModule().getIdentifier();
      log.infof("ModuleIdentifier: %s", identifier);
   }
View Full Code Here

Examples of org.jboss.modules.ModuleIdentifier

   {
      ServiceTarget serviceTarget = context.getServiceTarget();
      EchoService.addService(serviceTarget);

      ModuleClassLoader classLoader = (ModuleClassLoader)getClass().getClassLoader();
      ModuleIdentifier identifier = classLoader.getModule().getIdentifier();
      log.infof("ModuleIdentifier: %s", identifier);
   }
View Full Code Here

Examples of org.jboss.modules.ModuleIdentifier

   {
      ServiceTarget serviceTarget = context.getServiceTarget();
      EchoInvokerService.addService(serviceTarget);

      ModuleClassLoader classLoader = (ModuleClassLoader)getClass().getClassLoader();
      ModuleIdentifier identifier = classLoader.getModule().getIdentifier();
      log.infof("ModuleIdentifier: %s", identifier);
   }
View Full Code Here

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

Examples of org.jboss.modules.ModuleIdentifier

    }

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