Package org.jboss.deployers.spi.structure

Examples of org.jboss.deployers.spi.structure.ContextInfo


   public void testAddContextPathAndMetaDataAndClassPath()
   {
      DeploymentFactory factory = createDeploymentFactory();
      Deployment deployment = createDeployment();
      List<ClassPathEntry> classPath = factory.createClassPath("ClassPath");
      ContextInfo context = factory.addContext(deployment, "path", "metaDataPath", classPath);
      assertEquals("path", context.getPath());
      assertDefaultMetaDataPath(context.getMetaDataPath());
      assertEquals(classPath, context.getClassPath());

      assertContexts(deployment, context);

      classPath = null;
      deployment = createDeployment();
      context = factory.addContext(deployment, "path", "metaDataPath", classPath);
      assertEquals("path", context.getPath());
      assertDefaultMetaDataPath(context.getMetaDataPath());
      assertNull(context.getClassPath());

      assertContexts(deployment, context);
   }
View Full Code Here


   public void testAddContexts()
   {
      DeploymentFactory factory = createDeploymentFactory();
      Deployment deployment = createDeployment();
      ContextInfo context1 = factory.addContext(deployment, "path1");
      assertEquals("path1", context1.getPath());
      assertDefaultNonPath(context1);

      ContextInfo context2 = factory.addContext(deployment, "path2");
      assertEquals("path2", context2.getPath());
      assertDefaultNonPath(context1);

      ContextInfo context3 = factory.addContext(deployment, "path3");
      assertEquals("path3", context3.getPath());
      assertDefaultNonPath(context1);
     
      assertContexts(deployment, context1, context2, context3);
   }
View Full Code Here

   public void testAddContextsToContext()
   {
      DeploymentFactory factory = createDeploymentFactory();
      Deployment deployment = createDeployment();

      ContextInfo parent = factory.addContext(deployment, "parent");
      assertEquals("parent", parent.getPath());
      assertDefaultNonPath(parent);
     
      ContextInfo context1 = factory.addContext(parent, "path1");
      assertEquals("path1", context1.getPath());
      assertDefaultNonPath(context1);

      ContextInfo context2 = factory.addContext(parent, "path2");
      assertEquals("path2", context2.getPath());
      assertDefaultNonPath(context2);

      ContextInfo context3 = factory.addContext(parent, "path3");
      assertEquals("path3", context3.getPath());
      assertDefaultNonPath(context3);
     
      assertContexts(deployment, parent);
      assertContexts(parent, context1, context2, context3);
   }
View Full Code Here

   {
      DeploymentFactory factory = createDeploymentFactory();
      Deployment deployment = createDeployment();

      List<ClassPathEntry> classPath = factory.createClassPath("ClassPath");
      ContextInfo context1 = factory.addContext(deployment, "path1", "metaDataPath", classPath);
      assertEquals("path1", context1.getPath());
      assertDefaultMetaDataPath(context1.getMetaDataPath());
      assertEquals(classPath, context1.getClassPath());
     
      StructureMetaData structure = assertStructureMetaData(deployment);
      assertContexts(structure, context1);
     
      deployment = serializeDeserialize(deployment, Deployment.class);
      structure = assertStructureMetaData(deployment);
      assertContexts(structure, context1);
     
      ContextInfo context2 = factory.addContext(deployment, "path2");
      assertEquals("path2", context2.getPath());
      assertDefaultNonPath(context2);
      structure = assertStructureMetaData(deployment);
      assertContexts(structure, context1, context2);

      deployment = serializeDeserialize(deployment, Deployment.class);
      structure = assertStructureMetaData(deployment);
      assertContexts(structure, context1, context2);

      ContextInfo testContext = structure.getContext("path2");
     
      ContextInfo child1 = factory.addContext(testContext, "child1");
      assertEquals("child1", child1.getPath());
      assertDefaultNonPath(child1);

      ContextInfo child2 = factory.addContext(testContext, "child2");
      assertEquals("child2", child2.getPath());
      assertDefaultNonPath(child2);
     
      ContextInfo child3 = factory.addContext(testContext, "child3");
      assertEquals("child3", child3.getPath());
      assertDefaultNonPath(child3);

      assertContexts(structure, context1, context2);
      StructureMetaData childStructure = assertStructureMetaData(testContext);
      assertContexts(childStructure, child1, child2, child3);
View Full Code Here

   public void testDeployParentOneChildFailInChildDeployer1() throws Exception
   {
      DeployerClient main = getMainDeployer();
     
      Deployment deployment = createSimpleDeployment(parentName);
      ContextInfo child = addChild(deployment, childPath);
      makeFail(child, deployer1);
      main.addDeployment(deployment);
      main.process();

      assertEquals(expectedParentChild, deployer1.getDeployedUnits());
View Full Code Here

   public void testDeployParentOneChildFailInChildDeployer2() throws Exception
   {
      DeployerClient main = getMainDeployer();
     
      Deployment deployment = createSimpleDeployment(parentName);
      ContextInfo child = addChild(deployment, childPath);
      makeFail(child, deployer2);
      main.addDeployment(deployment);
      main.process();

      assertEquals(expectedParentChild, deployer1.getDeployedUnits());
View Full Code Here

   public void testDeployParentMultipleChildrenFailInChild1Deployer1() throws Exception
   {
      DeployerClient main = getMainDeployer();
     
      Deployment deployment = createSimpleDeployment(parentName);
      ContextInfo child1 = addChild(deployment, child1Path);
      makeFail(child1, deployer1);
      addChild(deployment, child2Path);
      main.addDeployment(deployment);
      main.process();
View Full Code Here

   public void testDeployParentMultipleChildrenFailInChild1Deployer2() throws Exception
   {
      DeployerClient main = getMainDeployer();
     
      Deployment deployment = createSimpleDeployment(parentName);
      ContextInfo child1 = addChild(deployment, child1Path);
      makeFail(child1, deployer2);
      addChild(deployment, child2Path);
      main.addDeployment(deployment);
      main.process();
View Full Code Here

   {
      DeployerClient main = getMainDeployer();
     
      Deployment deployment = createSimpleDeployment(parentName);
      addChild(deployment, child1Path);
      ContextInfo child2 = addChild(deployment, child2Path);
      makeFail(child2, deployer1);
      main.addDeployment(deployment);
      main.process();

      assertEquals(expectedParentChild1Child2, deployer1.getDeployedUnits());
View Full Code Here

   {
      DeployerClient main = getMainDeployer();
     
      Deployment deployment = createSimpleDeployment(parentName);
      addChild(deployment, child1Path);
      ContextInfo child2 = addChild(deployment, child2Path);
      makeFail(child2, deployer2);
      main.addDeployment(deployment);
      main.process();

      assertEquals(expectedParentChild1Child2, deployer1.getDeployedUnits());
View Full Code Here

TOP

Related Classes of org.jboss.deployers.spi.structure.ContextInfo

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.