Package org.jboss.deployers.structure.spi

Examples of org.jboss.deployers.structure.spi.DeploymentUnit.addAttachment()


            javaeeSpecAppName, moduleName, container.getEjbName());
      containerBMDBuilder.addPropertyMetaData("beanInstantiator", new AbstractInjectionValueMetaData(beanInstantiatorMcName));

      // TODO: This is an undocumented nonsense of MC
      DeploymentUnit parentUnit = unit.getParent();
      parentUnit.addAttachment(BeanMetaData.class + ":" + containerMCBeanName, containerBMDBuilder.getBeanMetaData());
      unit.addAttachment(org.jboss.ejb3.EJBContainer.class + ":" + containerMCBeanName, container);
     
      //add the new SPI container as an attachment (org.jboss.ejb3.singleton.deployer.StartupSingletonInitiatorDeployer will
      // use this at a later stage)
      unit.addAttachment(EJBContainer.class, container);
View Full Code Here


      if(endpointMap == null)
      {
         endpointMap = new ConcurrentHashMap<String, ContainerDependencyMetaData>();
         endpointAlternateMap = new ConcurrentHashMap<String, String>();
         mapEndpoints(top, endpointMap, endpointAlternateMap);
         top.addAttachment(ENDPOINT_MAP_KEY, endpointMap, Map.class);
         top.addAttachment(ALTERNATE_MAP_KEY, endpointAlternateMap);
         DeploymentEndpointResolver resolver = new MappedDeploymentEndpointResolver(endpointMap, endpointAlternateMap, unit.getRelativePath());
         top.addAttachment(DeploymentEndpointResolver.class, resolver);
      }
View Full Code Here

   }

   protected static void addTestComponent(DeploymentUnit unit, TestAttachment bean)
   {
      DeploymentUnit component = unit.addComponent(bean.getName().toString());
      component.addAttachment(TestAttachment.class.getName(), bean);
   }

   protected static void removeTestComponent(DeploymentUnit unit, TestAttachment bean)
   {
      unit.removeComponent(bean.getName().toString());
View Full Code Here

      main.change(single.getName(), DeploymentStages.CLASSLOADER);
      assertEquals(DeploymentStages.CLASSLOADER, main.getDeploymentStage(single.getName()));
      DeploymentUnit unit = assertDeploymentUnit(main, single.getName());
      DeploymentContext context = assertDeploymentContext(main, single.getName());
      unit.addAttachment("fail", deployer);
     
      deployer.clear();
      try
      {
         main.change(single.getName(), DeploymentStages.REAL);
View Full Code Here

   }

   protected static void addTestComponent(DeploymentUnit unit, TestComponentMetaData test)
   {
      DeploymentUnit component = unit.addComponent(test.name);
      component.addAttachment(TestComponentMetaData.class, test);
   }

   protected static void removeTestComponent(DeploymentUnit unit, TestComponentMetaData test)
   {
      unit.removeComponent(test.name);
View Full Code Here

   }

   protected static void addTestComponent(DeploymentUnit unit, TestMetaData2 test)
   {
      DeploymentUnit component = unit.addComponent(test.getName());
      component.addAttachment(TestMetaData2.class, test);
   }

   protected static void removeTestComponent(DeploymentUnit unit, TestMetaData2 test)
   {
      unit.removeComponent(test.getName());
View Full Code Here

   }

   protected static void addTestComponent(DeploymentUnit unit, TestComponentMetaData test)
   {
      DeploymentUnit component = unit.addComponent(test.name);
      component.addAttachment(TestComponentMetaData.class, test);
   }

   protected static void removeTestComponent(DeploymentUnit unit, TestComponentMetaData test)
   {
      unit.removeComponent(test.name);
View Full Code Here

   }

   protected static void addTestComponent(DeploymentUnit unit, TestMetaData1 test)
   {
      DeploymentUnit component = unit.addComponent(test.getName());
      component.addAttachment(TestMetaData1.class, test);
   }

   protected static void removeTestComponent(DeploymentUnit unit, TestMetaData1 test)
   {
      unit.removeComponent(test.getName());
View Full Code Here

   public void testAltDD() throws Exception
   {
      final VirtualFile altDD = getMockVF();
      AbstractVFSDeploymentContext context = new AbstractVFSDeploymentContext();
      DeploymentUnit unit = context.getDeploymentUnit();
      unit.addAttachment(Object.class.getName() + ".altDD", altDD);

      final boolean pickedUpAltDD[] = new boolean[1];
      AbstractVFSParsingDeployer<Object> deployer = new AbstractVFSParsingDeployer<Object>(Object.class)
      {
         @Override
View Full Code Here

      // add property metadata based on type instead of field name.
      containerBMDBuilder.addPropertyMetaData("javaComp", javaCompInjectMetaData);

      // TODO: This is an undocumented nonsense of MC
      DeploymentUnit parentUnit = unit.getParent();
      parentUnit.addAttachment(BeanMetaData.class + ":" + containerMCBeanName, containerBMDBuilder.getBeanMetaData());
      unit.addAttachment(org.jboss.ejb3.EJBContainer.class + ":" + containerMCBeanName, container);
   }

   /**
    * Returns the {@link JavaEEComponent} MC bean name
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.