Package org.jboss.deployers.spi.attachments

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


      deployment.setName("KernelDeployerTest");
     
      BeanMetaDataFactory metaData = new AbstractBeanMetaData("Test", Simple.class.getName());
      deployment.setBeanFactories(Collections.singletonList(metaData));

      MutableAttachments attachments = (MutableAttachments) context.getPredeterminedManagedObjects();
      attachments.addAttachment("KernelDeployerTest", deployment);
     
      assertDeploy(context);
      ControllerContext ctx = controller.getInstalledContext("Test");

      ScopeInfo scopeInfo = ctx.getScopeInfo();
View Full Code Here


     
      // Get the changed attachment
      TestAttachment attachment = (TestAttachment) mo.getAttachment();

      // Redeploy with our changed attachment
      MutableAttachments attachments = (MutableAttachments) context.getPredeterminedManagedObjects();
      attachments.addAttachment(TestAttachment.class, attachment);
      main.addDeployment(context);
      main.process();

      // Check the changed settings as seen by the deployer
      assertNotNull(deployer.lastAttachment);
View Full Code Here

      assertEquals(CAB, deployer3.undeployed);
   }

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

      mutable.addAttachment(TestDependencyMetaData.class, md);
   }
  
   protected static void makeFail(PredeterminedManagedObjectAttachments attachments, Deployer deployer)
   {
      MutableAttachments mutable = (MutableAttachments) attachments.getPredeterminedManagedObjects();
      mutable.addAttachment("fail", deployer);
   }
View Full Code Here

      deployment.setName("KernelDeployerTest");
     
      BeanMetaDataFactory metaData = new AbstractBeanMetaData("Test", Simple.class.getName());
      deployment.setBeanFactories(Collections.singletonList(metaData));

      MutableAttachments attachments = (MutableAttachments) context.getPredeterminedManagedObjects();
      attachments.addAttachment("KernelDeployerTest", deployment);
     
      assertDeploy(context);
      assertNotNull(controller.getInstalledContext("Test"));
     
      assertUndeploy(context);
View Full Code Here

   protected Deployment createSimple() throws Exception
   {
      Deployment deployment = createDeployment();
      StructureMetaData structure = StructureMetaDataFactory.createStructureMetaData();
      MutableAttachments attachments = (MutableAttachments) deployment.getPredeterminedManagedObjects();
      attachments.addAttachment(StructureMetaData.class, structure);

      DeploymentFactory factory = getDeploymentFactory();
      factory.addContext(deployment, "");
      return deployment;
   }
View Full Code Here

   protected Deployment createSimpleWithAttachment() throws Exception
   {
      Deployment deployment = createDeployment();
      StructureMetaData structure = StructureMetaDataFactory.createStructureMetaData();
      MutableAttachments attachments = (MutableAttachments) deployment.getPredeterminedManagedObjects();
      attachments.addAttachment(StructureMetaData.class, structure);
      attachments.addAttachment("test", "hello");

      DeploymentFactory factory = getDeploymentFactory();
      factory.addContext(deployment, "");
      return deployment;
   }
View Full Code Here

   {
      assertNotNull(context);
     
      assertEquals(deployment.getName(), context.getName());
     
      MutableAttachments attachments = (MutableAttachments) deployment.getPredeterminedManagedObjects();
      StructureMetaData structure = attachments.getAttachment(StructureMetaData.class);
      checkAttachments(context, deployment);

      assertNotNull(structure);
      checkDeployment(context, structure);
View Full Code Here

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

   protected <T> void assertDeploy(VFSDeployment context, Class<T> clazz, T mo) throws Exception
   {
      main.addDeployment(context);
      if (mo != null)
      {
         MutableAttachments attachments = (MutableAttachments) context.getPredeterminedManagedObjects();
         attachments.addAttachment(clazz, mo);
      }
      main.process();
      assertEquals("Should be Deployed " + context, DeploymentState.DEPLOYED, main.getDeploymentState(context.getName()));
   }
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.