Package org.jboss.modules

Examples of org.jboss.modules.ModuleSpec$AliasBuilder


        specBuilder.addDependency(DependencySpec.createLocalDependencySpec());
        createDependencies(phaseContext, specBuilder, localDependencies);
        DelegatingClassFileTransformer delegatingClassFileTransformer = new DelegatingClassFileTransformer();
        specBuilder.setClassFileTransformer(delegatingClassFileTransformer);
        deploymentUnit.putAttachment(DelegatingClassFileTransformer.ATTACHMENT_KEY, delegatingClassFileTransformer);
        final ModuleSpec moduleSpec = specBuilder.create();
        final ServiceName moduleSpecServiceName = ServiceModuleLoader.moduleSpecServiceName(moduleIdentifier);
        final ValueService<ModuleSpec> moduleSpecService = new ValueService<ModuleSpec>(new ImmediateValue<ModuleSpec>(
                moduleSpec));
        phaseContext.getServiceTarget().addService(moduleSpecServiceName, moduleSpecService).addDependencies(
                deploymentUnit.getServiceName()).addDependencies(phaseContext.getPhaseServiceName()).setInitialMode(
View Full Code Here


   }

   @Override
   protected ModuleSpec findModule(ModuleIdentifier id) throws ModuleLoadException
   {
      ModuleSpec result = findAddonModule(id);
      if (result == null)
         result = findRegularModule(id);

      return result;
   }
View Full Code Here

      }
   }

   private ModuleSpec findRegularModule(ModuleIdentifier id)
   {
      ModuleSpec result = null;
      for (ModuleSpecProvider p : moduleProviders)
      {
         result = p.get(this, id);
         if (result != null)
            break;
View Full Code Here

   }

   @Override
   protected ModuleSpec findModule(ModuleIdentifier id) throws ModuleLoadException
   {
      ModuleSpec result = findRegularModule(id);

      if (result == null && currentAddon.get() != null)
         result = findAddonModule(id);

      return result;
View Full Code Here

      return result;
   }

   private ModuleSpec findRegularModule(ModuleIdentifier id)
   {
      ModuleSpec result = null;
      for (ModuleSpecProvider p : getModuleProviders())
      {
         result = p.get(this, id);
         if (result != null)
            break;
View Full Code Here

                    log.tracef(controller.getStartException(), "serviceFailed: %s", controller);
                    done(controller, controller.getStartException());
                    break;
                case STOP_REQUESTED_to_STOPPING: {
                    log.tracef("serviceStopping: %s", controller);
                    ModuleSpec moduleSpec = this.moduleSpec;
                    try {
                        Module module = loadModule(moduleSpec.getModuleIdentifier());
                        unloadModuleLocal(module);
                    } catch (ModuleLoadException e) {
                        // ignore, the module should always be already loaded by this point,
                        // and if not we will only mask the true problem
                    }
View Full Code Here

                    log.tracef(controller.getStartException(), "serviceFailed: %s", controller);
                    done(controller, controller.getStartException());
                    break;
                case STOP_REQUESTED_to_STOPPING: {
                    log.tracef("serviceStopping: %s", controller);
                    ModuleSpec moduleSpec = this.moduleSpec;
                    ModuleIdentifier identifier = moduleSpec.getModuleIdentifier();
                    Module module = findLoadedModuleLocal(identifier);
                    if(module != null)
                        unloadModuleLocal(module);
                    // TODO: what if the service is restarted?
                    controller.removeListener(this);
View Full Code Here

   }

   @Override
   protected ModuleSpec findModule(ModuleIdentifier id) throws ModuleLoadException
   {
      ModuleSpec result = findAddonModule(id);
      if (result == null)
         result = findRegularModule(id);

      return result;
   }
View Full Code Here

      }
   }

   private ModuleSpec findRegularModule(ModuleIdentifier id)
   {
      ModuleSpec result = null;
      for (ModuleSpecProvider p : moduleProviders)
      {
         result = p.get(this, id);
         if (result != null)
            break;
View Full Code Here

   }

   @Override
   protected ModuleSpec findModule(ModuleIdentifier id) throws ModuleLoadException
   {
      ModuleSpec result = findRegularModule(id);

      if (result == null && currentAddon.get() != null)
         result = findAddonModule(id);

      return result;
View Full Code Here

TOP

Related Classes of org.jboss.modules.ModuleSpec$AliasBuilder

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.