Examples of installModule()


Examples of org.jboss.gravia.runtime.Runtime.installModule()

        Module module = runtime.getModule(resource.getIdentity());
        if (module == null) {
            ModuleLoader moduleLoader = injectedServiceModuleLoader.getValue();
            ModuleIdentifier modid = ModuleIdentifier.create(ServiceModuleLoader.MODULE_PREFIX + runtimeName);
            ClassLoader classLoader = moduleLoader.loadModule(modid).getClassLoader();
            module = runtime.installModule(classLoader, resource, null);
        }

        Resource modres = module != null ? module.adapt(Resource.class) : resource;
        return new AbstractResourceHandle(modres, module) {
            @Override
View Full Code Here

Examples of org.jboss.gravia.runtime.Runtime.installModule()

                    break;
                }
            }
            Manifest manifest = new Manifest(extensionURL.openStream());
            Dictionary<String, String> headers = new ManifestHeadersProvider(manifest).getHeaders();
            module = runtime.installModule(classLoader, headers);

            // Attach the {@link ModuleEntriesProvider} so
            ModuleEntriesProvider entriesProvider = new ClassLoaderEntriesProvider(module);
            Attachable attachable = AbstractModule.assertAbstractModule(module);
            attachable.putAttachment(AbstractModule.MODULE_ENTRIES_PROVIDER_KEY, entriesProvider);
View Full Code Here

Examples of org.jboss.gravia.runtime.Runtime.installModule()

        // Install the module
        ModuleClassLoader classLoader = depUnit.getAttachment(Attachments.MODULE).getClassLoader();
        try {
            Runtime runtime = RuntimeLocator.getRequiredRuntime();
            Module module = runtime.installModule(classLoader, resource, headers, context);
            depUnit.putAttachment(GraviaConstants.MODULE_KEY, module);
            depUnit.putAttachment(GraviaConstants.RESOURCE_KEY, module.adapt(Resource.class));
        } catch (ModuleException ex) {
            throw new DeploymentUnitProcessingException(ex);
        }
View Full Code Here

Examples of org.jboss.gravia.runtime.Runtime.installModule()

        Module module = runtime.getModule(identity);
        BundleWiring wiring = bundle.adapt(BundleWiring.class);
        if (module == null && wiring != null) {
            try {
                ClassLoader classLoader = wiring.getClassLoader();
                module = runtime.installModule(classLoader, resource, null);
            } catch (ModuleException ex) {
                throw new ProvisionException(ex);
            }
        }
View Full Code Here

Examples of org.jboss.gravia.runtime.Runtime.installModule()

        // Add the module to the {@link SharedModuleClassLoader}
        SharedModuleClassLoader.addSharedModule(resource);

        Runtime runtime = RuntimeLocator.getRequiredRuntime();
        ClassLoader classLoader = SharedModuleClassLoader.class.getClassLoader();
        return runtime.installModule(classLoader, resource, null);
    }

    private String getContextPath(Resource res) {
        String contextPath = (String) res.getIdentityCapability().getAttribute("contextPath");
        if (contextPath == null)
View Full Code Here

Examples of org.jboss.gravia.runtime.Runtime.installModule()

        // Add the module to the {@link SharedModuleClassLoader}
        SharedModuleClassLoader.addSharedModule(resource);

        Runtime runtime = RuntimeLocator.getRequiredRuntime();
        ClassLoader classLoader = SharedModuleClassLoader.class.getClassLoader();
        return runtime.installModule(classLoader, resource, null);
    }

    private String getContextPath(Resource res) {
        String contextPath = (String) res.getIdentityCapability().getAttribute("contextPath");
        if (contextPath == null)
View Full Code Here

Examples of org.jboss.gravia.runtime.Runtime.installModule()

        Module module = runtime.getModule(identity);
        BundleWiring wiring = bundle.adapt(BundleWiring.class);
        if (module == null && wiring != null) {
            try {
                ClassLoader classLoader = wiring.getClassLoader();
                module = runtime.installModule(classLoader, resource, null);
            } catch (ModuleException ex) {
                throw new ProvisionException(ex);
            }
        }
View Full Code Here

Examples of org.jboss.gravia.runtime.Runtime.installModule()

        Module module = runtime.getModule(identity);
        BundleWiring wiring = bundle.adapt(BundleWiring.class);
        if (module == null && wiring != null) {
            try {
                ClassLoader classLoader = wiring.getClassLoader();
                module = runtime.installModule(classLoader, resource, null);
            } catch (ModuleException ex) {
                throw new ProvisionException(ex);
            }
        }
View Full Code Here

Examples of org.jboss.gravia.runtime.Runtime.installModule()

        // Install the module
        ModuleClassLoader classLoader = depUnit.getAttachment(Attachments.MODULE).getClassLoader();
        try {
            Runtime runtime = RuntimeLocator.getRuntime();
            Module module = runtime.installModule(classLoader, resource, headers);
            depUnit.putAttachment(GraviaConstants.MODULE_KEY, module);
        } catch (ModuleException ex) {
            throw new DeploymentUnitProcessingException(ex);
        }
    }
View Full Code Here

Examples of org.jboss.gravia.runtime.Runtime.installModule()

        // Install the resource as module
        ModuleLoader moduleLoader = org.jboss.modules.Module.getBootModuleLoader();
        ModuleClassLoader classLoader = moduleLoader.loadModule(modid).getClassLoader();
        Runtime runtime = RuntimeLocator.getRequiredRuntime();
        final Module module = runtime.installModule(classLoader, resource, null);

        // Start the module
        module.start();

        Resource modres = module.adapt(Resource.class);
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.