Package org.jboss.modules

Examples of org.jboss.modules.Module$Visited


                throw invalidAttributeValue(reader, 0);
            }

            // Register element handlers for this extension
            try {
                final Module module = moduleLoader.loadModule(ModuleIdentifier.fromString(moduleName));
                boolean initialized = false;
                for (final Extension extension : module.loadService(Extension.class)) {
                    extension.initializeParsers(context);
                    if (!initialized) {
                        initialized = true;
                    }
                }
                if (!initialized) {
                    throw new IllegalStateException("No META-INF/services/" + Extension.class.getName() + " found for " + module.getIdentifier());
                }
                final ModelNode add = new ModelNode();
                add.get(OP_ADDR).set(address).add(EXTENSION, moduleName);
                add.get(OP).set(ADD);
                list.add(add);
View Full Code Here


        final DeploymentUnit unit = phaseContext.getDeploymentUnit();
        final List<KernelDeploymentXmlDescriptor> kdXmlDescriptors = unit.getAttachment(KernelDeploymentXmlDescriptor.ATTACHMENT_KEY);
        if (kdXmlDescriptors == null || kdXmlDescriptors.isEmpty())
            return;

        final Module module = unit.getAttachment(Attachments.MODULE);
        if (module == null)
            throw PojoMessages.MESSAGES.noModuleFound(unit);

        final ServiceTarget serviceTarget = phaseContext.getServiceTarget();
        final DeploymentReflectionIndex index = unit.getAttachment(Attachments.REFLECTION_INDEX);
View Full Code Here

    private BeanMetaDataConfig bmd;

    @SuppressWarnings("unchecked")
    public Object create() throws Throwable {
        Module module = bmd.getModule().getInjectedModule().getValue();
        Class<?> beanClass = module.getClassLoader().loadClass(bmd.getBeanClass());
        DeploymentReflectionIndex index = DeploymentReflectionIndex.create();
        BeanInfo beanInfo = new DefaultBeanInfo(index, beanClass);
        Object result = BeanUtils.instantiateBean(bmd, beanInfo, index, module);
        BeanUtils.configure(bmd, beanInfo, module, result, false);
        BeanUtils.dispatchLifecycleJoinpoint(beanInfo, result, bmd.getCreate(), "create");
View Full Code Here

            ModuleIdentifier identifier = ModuleIdentifier.fromString(moduleName);
            if (moduleName.startsWith(ServiceModuleLoader.MODULE_PREFIX)) {
                ServiceName serviceName = ServiceModuleLoader.moduleServiceName(identifier);
                visitor.addDependency(serviceName, getInjectedModule());
            } else {
                Module dm = visitor.loadModule(identifier);
                getInjectedModule().setValue(new ImmediateValue<Module>(dm));
            }
        } else {
            getInjectedModule().setValue(new ImmediateValue<Module>(visitor.getModule()));
        }
View Full Code Here

   {
      try
      {
         this.currentAddon.set(addon);
         ModuleIdentifier moduleId = moduleCache.getModuleId(addon);
         Module result = loadModule(moduleId);
         return result;
      }
      catch (ModuleLoadException e)
      {
         throw e;
View Full Code Here

   }

   @Override
   protected Module preloadModule(ModuleIdentifier identifier) throws ModuleLoadException
   {
      Module pluginModule = super.preloadModule(identifier);
      return pluginModule;
   }
View Full Code Here

   public void releaseAddonModule(Addon addon)
   {
      ModuleIdentifier id = moduleCache.getModuleId(addon);
      moduleJarFileCache.closeJarFileReferences(id);
      Module loadedModule = findLoadedModuleLocal(id);
      if (loadedModule != null)
         unloadModuleLocal(loadedModule);
      moduleCache.clear(addon);
   }
View Full Code Here

        return moduleSpec;
    }

    @Override
    protected Module preloadModule(ModuleIdentifier identifier) throws ModuleLoadException {
        Module module = ModuleLoader.preloadModule(identifier, injectedModuleLoader.getValue());
        if (module == null)
            ROOT_LOGGER.debugf("Cannot obtain module for: %s", identifier);
        return module;
    }
View Full Code Here

            }
        }

        // Register module with the OSGi layer
        ModuleLoader moduleLoader = Module.getBootModuleLoader();
        Module module = moduleLoader.loadModule(identifier);
        OSGiMetaData metadata = getModuleMetadata(module);
        return bundleManager.registerModule(serviceTarget, module, metadata);
    }
View Full Code Here

            // Setup the OSGi {@link Framework} properties
            Map<String, Object> props = new HashMap<String, Object>(injectedSubsystemState.getValue().getProperties());
            setupIntegrationProperties(context, props);

            // Register the URLStreamHandlerFactory
            Module coreFrameworkModule = ((ModuleClassLoader) FrameworkBuilder.class.getClassLoader()).getModule();
            Module.registerURLStreamHandlerFactoryModule(coreFrameworkModule);
            Module.registerContentHandlerFactoryModule(coreFrameworkModule);

            // Configure the {@link Framework} builder
            FrameworkBuilder builder = new FrameworkBuilder(props);
View Full Code Here

TOP

Related Classes of org.jboss.modules.Module$Visited

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.