Package org.jboss.beans.metadata.spi.builder

Examples of org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder.addDemand()


   {
      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(jndiBinderName, jndiBinder.getClass().getName());
      builder.setConstructorValue(jndiBinder);

      String containerName = container.getXml().getContainerName();
      builder.addDemand(containerName, ControllerState.START, ControllerState.DESCRIBED, null);
      return builder.getBeanMetaData();

   }

   /**
 
View Full Code Here


         Set<DemandMetaData> demands = policy.getDemands();
         if (demands != null && demands.isEmpty() == false)
         {
            for (DemandMetaData demand : demands)
            {
               containerBMDBuilder.addDemand(demand.getDemand());
            }
         }
         // supplies
         Set<SupplyMetaData> supplies = policy.getSupplies();
         if (supplies != null && supplies.isEmpty() == false)
View Full Code Here

      // the proxies/invocation handlers for singleton do NOT push the container
      // states. So let's just depend on a START state container, so that when the
      // jndi binder binds the proxies, they will be ready to use (i.e. will be sure that
      // the container is available for invocation).
      builder.addDemand(containerName, ControllerState.START, ControllerState.START, null);
      for (Binding binding : jndiBinder.getBindings())
      {
         builder.addSupply("jndi:" + binding.getJndiName());
      }
      if (unit.isComponent())
View Full Code Here

      {
         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

         if (demands != null && demands.isEmpty() == false)
         {
            for (DemandMetaData demand : demands)
            {
               logger.info(demand.getDemand());
               containerBMDBuilder.addDemand(demand.getDemand());
            }
         }
         // supplies
         logger.info("with supplies: ");
         Set<SupplyMetaData> supplies = policy.getSupplies();
View Full Code Here

   {
      BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder(injectorMCBeanName, injector.getClass().getName());
      builder.setConstructorValue(injector);

      // add dependency on SwitchBoard barrier
      builder.addDemand(barrier.getId(), ControllerState.CREATE, ControllerState.START, null);

      // return the Injector BMD
      return builder.getBeanMetaData();
   }
  
View Full Code Here

      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

      for (String barrier : barriers) {
         if (barrier == null) {
            continue;
         }
         // add dependency on INSTALLED state (i.e. fully populated and invokable ENC) of Barrier
         builder.addDemand(barrier, ControllerState.CREATE, ControllerState.INSTALLED, null);
      }

      if (unit.isComponent())
      {
         // Attach it to parent since we are processing a component DU and BeanMetaDataDeployer doesn't
View Full Code Here

         {
            logger.debug("with demands: ");
            for (DemandMetaData demand : demands)
            {
               logger.debug(demand.getDemand());
               containerBMDBuilder.addDemand(demand.getDemand());
            }
         }
         // supplies
         Set<SupplyMetaData> supplies = policy.getSupplies();
         if (supplies != null && supplies.isEmpty() == false)
View Full Code Here

      String containerName = container.getXml().getContainerName();
      // the proxies/invocation handlers for singleton do NOT push the container
      // states. So let's just depend on a START state container, so that when the
      // jndi binder binds the proxies, they will be ready to use (i.e. will be sure that
      // the container is available for invocation).
      builder.addDemand(containerName, ControllerState.START, ControllerState.START, null);
      return builder.getBeanMetaData();

   }

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