Package org.jboss.deployers.spi.attachments

Examples of org.jboss.deployers.spi.attachments.MutableAttachments


      }
   }
  
   protected static void addMetaData(PredeterminedManagedObjectAttachments attachments, TestComponentMetaDataContainer md)
   {
      MutableAttachments mutable = (MutableAttachments) attachments.getPredeterminedManagedObjects();
      mutable.addAttachment(TestComponentMetaDataContainer.class, md);
   }
View Full Code Here


      Deployment parent = createSimpleDeployment("Parent");

      ContextInfo ci1 = factory.addContext(parent, "C1");
      Attachments attachments1 = ci1.getPredeterminedManagedObjects();
      MutableAttachments ma1 = (MutableAttachments) attachments1;
      ma1.addAttachment("1.1", "1", String.class);
      ma1.addAttachment("1.2", "2", String.class);

      ContextInfo ci2 = factory.addContext(parent, "C2");
      Attachments attachments2 = ci2.getPredeterminedManagedObjects();
      MutableAttachments ma2 = (MutableAttachments) attachments2;
      ma2.addAttachment("2.1", "3", String.class);
      ma2.addAttachment("2.2", "4", String.class);

      main.addDeployment(parent);
      main.process();

      assertEquals(PC2C1, deployer1.deployed);
View Full Code Here

      }
   }
  
   public void testRemoveAttachmentByName() throws Exception
   {
      MutableAttachments mutable = getMutable();
      ExpectedAttachments expected = new ExpectedAttachments();
      assertRemoveNotPresentAttachmentByName(mutable, expected, "name1");
     
      assertAddAttachmentByName(mutable, expected, "name1", "attachment1");
      assertAddAttachmentByName(mutable, expected, "name2", "different2");
View Full Code Here

      return result;
   }
  
   public void testRemoveAttachmentByNameAndType() throws Exception
   {
      MutableAttachments mutable = getMutable();
      ExpectedAttachments expected = new ExpectedAttachments();
      assertRemoveNotPresentAttachmentByNameAndType(mutable, expected, "name1", String.class);
     
      assertAddAttachmentByNameAndType(mutable, expected, "name1", "attachment1", String.class);
      assertAddAttachmentByNameAndType(mutable, expected, "name2", "different2", String.class);
View Full Code Here

      return result;
   }
  
   public void testRemoveAttachmentByType() throws Exception
   {
      MutableAttachments mutable = getMutable();
      ExpectedAttachments expected = new ExpectedAttachments();
      assertRemoveNotPresentAttachmentByType(mutable, expected, Integer.class);
     
      assertAddAttachmentByType(mutable, expected, Integer.class, 1);
      assertAddAttachmentByType(mutable, expected, String.class, "attachment");
View Full Code Here

   public void testSerialization() throws Exception
   {
      Attachments attachments = getAttachments();
      serializeDeserialize(attachments, Attachments.class);

      MutableAttachments mutable = getMutable();
      serializeDeserialize(mutable, MutableAttachments.class);
     
      mutable.addAttachment(String.class, "Hello");
      mutable = serializeDeserialize(mutable, MutableAttachments.class);
      assertEquals("Hello", mutable.getAttachment(String.class));
   }
View Full Code Here

      DeployerClient main = createMainDeployer(deployer);
     
      String name = "simple";
     
      Deployment deployment = createSimpleDeployment(name);
      MutableAttachments attachments = (MutableAttachments) deployment.getPredeterminedManagedObjects();
      attachments.addAttachment(DeploymentStage.class, DeploymentStages.DESCRIBE);

      main.deploy(deployment);
      try
      {
         DeploymentUnit unit = getDeploymentUnit(main, name);
View Full Code Here

      AbstractKernelDeployment deployment = new AbstractKernelDeployment();
      deployment.setName("KernelDeployerTest1");
      BeanMetaDataFactory md1 = new AbstractBeanMetaData("PUD", PUDeployment.class.getName());
      BeanMetaDataFactory md2 = new AbstractBeanMetaData("XPC", DefaultXPCResolver.class.getName());
      deployment.setBeanFactories(Arrays.asList(md1, md2));
      MutableAttachments attachments = (MutableAttachments) context.getPredeterminedManagedObjects();
      attachments.addAttachment("KernelDeployerTest1", deployment);

      assertDeploy(context);
      try
      {
         ControllerContext pud = controller.getInstalledContext("PUD");
View Full Code Here

      AbstractKernelDeployment deployment = new AbstractKernelDeployment();
      deployment.setName("KernelDeployerTest2");
      BeanMetaDataFactory md1 = new AbstractBeanMetaData("PUD", PUDeployment.class.getName());
      deployment.setBeanFactories(Arrays.asList(md1));
      MutableAttachments attachments = (MutableAttachments) context.getPredeterminedManagedObjects();
      attachments.addAttachment("KernelDeployerTest2", deployment);

      assertDeploy(context);
      try
      {
         ControllerContext pud = controller.getContext("PUD", null);
View Full Code Here

      AbstractConstructorMetaData acmd = new AbstractConstructorMetaData();
      acmd.setValueObject(bean);
      md1.setConstructor(acmd);
      BeanMetaDataFactory md2 = new AbstractBeanMetaData("XPC", DefaultXPCResolver.class.getName());
      deployment.setBeanFactories(Arrays.asList(md1, md2));
      MutableAttachments attachments = (MutableAttachments) context.getPredeterminedManagedObjects();
      attachments.addAttachment("KernelDeployerTest3", deployment);

      assertDeploy(context);
      try
      {
         ControllerContext pud = controller.getInstalledContext("PUD");
View Full Code Here

TOP

Related Classes of org.jboss.deployers.spi.attachments.MutableAttachments

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.