Package org.jboss.switchboard.spi

Examples of org.jboss.switchboard.spi.Barrier


      // EJBTHREE-1335: container name in meta data
      generateContainerName(container, beanMD);
     
      // setup switchboard
      Barrier switchBoard = this.getSwitchBoardBarrier(container);
      // the container cannot function without an SwitchBoard Barrier
      if (switchBoard == null)
      {
         throw new RuntimeException("No SwitchBoard Barrier found for bean: " + container.getEjbName() + " in unit: "
               + this.jbossUnit + " (or its component deployment unit)");
      }
      // add dependency on START (and not INSTALLED) state of Switchboard, since the container only requires a fully populated ENC context,
      // but doesn't require a invokable context. An invokable context is only needed by Injector.
      dependsPolicy.addDependency(this.createSwitchBoardDependency(ejbContainer, switchBoard));
      log.debug("Added dependency on Switchboard " + switchBoard.getId() + " for EJB container " + ejbContainer.getName());
     
     
      // create and setup Injector(s) for InjectionManager 
      InjectionManager injectionManager = this.getInjectionManager(container);
      // the container cannot function without an InjectionManager
View Full Code Here


               dependencies.add(sdmd);
            }
         }
        
         // SwitchBoard
         Barrier switchBoard = unit.getAttachment(Barrier.class);
         if (switchBoard != null)
         {
            // Setup switchboard dependency on the deployment
            ServiceDependencyMetaData switchBoardDependency = new AnyStateServiceDependencyMetaData(switchBoard.getId(), ControllerState.START, ControllerState.INSTALLED);
            dependencies.add(switchBoardDependency);
            log.debug("Added switchboard dependency: " + switchBoard.getId() + " for web module: " + name);
         }
         // Injection Manager
         InjectionManager injectionManager = unit.getAttachment(InjectionManager.class);
         if (injectionManager != null)
         {
View Full Code Here

      containerBMDBuilder.setConstructorValue(container);

      DependencyPolicy containerDependencyPolicy = container.getDependencyPolicy();

      // Add dependency on switchboard
      Barrier switchBoard = unit.getAttachment(Barrier.class);
      // the container cannot function without an SwitchBoard Barrier
      if (switchBoard == null)
      {
         throw new RuntimeException("No SwitchBoard Barrier found for bean: " + container.getEjbName() + " in unit: " + unit);
      }
      // add dependency on START (and not INSTALLED) state of Switchboard, since the container only requires a fully populated ENC context,
      // but doesn't require a invokable context. An invokable context is only needed by Injector.
      containerBMDBuilder.addDemand(switchBoard.getId(), ControllerState.CREATE, ControllerState.START, null);
      logger.debug("Added dependency on switchboard " + switchBoard.getId() + " for container " + container.getName());
     
      InjectionManager injectionManager = unit.getAttachment(InjectionManager.class);
      // the container cannot function without an InjectionManager
      if (injectionManager == null)
      {
View Full Code Here

      // Add dependency on container
      String containerName = container.getMetaData().getContainerName();
      builder.addDependency(containerName);
     
      // Add dependency on switchboard
      Barrier switchBoard = unit.getAttachment(Barrier.class);
      // the container cannot function without an SwitchBoard Barrier
      if (switchBoard == null)
      {
         throw new RuntimeException("No SwitchBoard Barrier in unit: " + unit);
      }
      // add dependency on INSTALLED state (i.e. fully populated and invokable ENC) SwitchBoard
      builder.addDemand(switchBoard.getId(), ControllerState.CREATE, ControllerState.INSTALLED, null);

      // EJBTHREE-2227 https://issues.jboss.org/browse/EJBTHREE-2227 add dependency on INSTALLED state
      // (i.e. fully populated and invokable ENC) of ALL other Barriers in the DU hierarchy to avoid instantiating
      // the @Startup @Singleton too early
      final Set<String> barriers = this.getBarrierIdsFromAllDeploymentUnitsInHierarchy(unit);
View Full Code Here

      allDUs.add(topLevelDU);
      // now fetch all the child DUs recursively from the top level DU
      allDUs.addAll(this.getChildrenRecursively(topLevelDU));
      // find any Barrier in each of the DU
      for (DeploymentUnit du : allDUs) {
         final Barrier barrier = du.getAttachment(Barrier.class);
         if (barrier != null) {
            barriers.add(barrier.getId());
         }
      }
      return barriers;
   }
View Full Code Here

      containerBMDBuilder.setConstructorValue(container);

      DependencyPolicy containerDependencyPolicy = container.getDependencyPolicy();

      // Add dependency on switchboard
      Barrier switchBoard = unit.getAttachment(Barrier.class);
      // the container cannot function without an SwitchBoard Barrier
      if (switchBoard == null)
      {
         throw new RuntimeException("No SwitchBoard Barrier found for bean: " + container.getEjbName() + " in unit: " + unit);
      }
      // add dependency on START (and not INSTALLED) state of Switchboard, since the container only requires a fully populated ENC context,
      // but doesn't require a invokable context. An invokable context is only needed by Injector.
      containerBMDBuilder.addDemand(switchBoard.getId(), ControllerState.CREATE, ControllerState.START, null);
      logger.debug("Added dependency on switchboard " + switchBoard.getId() + " for container " + container.getName());
     
      InjectionManager injectionManager = unit.getAttachment(InjectionManager.class);
      // the container cannot function without an InjectionManager
      if (injectionManager == null)
      {
View Full Code Here

      // Add dependency on container
      String containerName = container.getMetaData().getContainerName();
      builder.addDependency(containerName);
     
      // Add dependency on switchboard
      Barrier switchBoard = unit.getAttachment(Barrier.class);
      // the container cannot function without an SwitchBoard Barrier
      if (switchBoard == null)
      {
         throw new RuntimeException("No SwitchBoard Barrier in unit: " + unit);
      }
      // add dependency on INSTALLED state (i.e. fully populated and invokable ENC) SwitchBoard
      builder.addDemand(switchBoard.getId(), ControllerState.CREATE, ControllerState.INSTALLED, null);
     
      if (unit.isComponent())
      {
         // Attach it to parent since we are processing a component DU and BeanMetaDataDeployer doesn't
         // pick up BeanMetaData from component DU
View Full Code Here

TOP

Related Classes of org.jboss.switchboard.spi.Barrier

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.