Package org.jboss.deployers.client.spi

Examples of org.jboss.deployers.client.spi.DeployerClient


      }
   }

   public void testStructureSuccess() throws Exception
   {
      DeployerClient main = getMainDeployer();
      Deployment deployment = createSimpleDeployment("failure");
      main.addDeployment(deployment);
      main.process();
      main.checkStructureComplete(deployment);
   }
View Full Code Here


      main.checkStructureComplete(deployment);
   }

   public void testHalfThenAll() throws Exception
   {
      DeployerClient main = getDependencyMainDeployer();

      Deployment dA = createSimpleDeployment("A");
      addAttachment(dA, "xB");

      main.addDeployment(dA);
      main.process();
      try
      {
         main.checkComplete(dA);
         fail("Should not be here.");
      }
      catch (DeploymentException e)
      {
         assertInstanceOf(e, IncompleteDeploymentException.class);
      }

      Deployment dB = createSimpleDeployment("B");
      addAttachment(dB, null);
      main.deploy(dB);

      main.checkComplete(dA);
   }
View Full Code Here

      main.checkComplete(dA);
   }

   public void testAllThenHalf() throws Exception
   {
      DeployerClient main = getDependencyMainDeployer();

      Deployment dA = createSimpleDeployment("A");
      addAttachment(dA, "xB");

      main.addDeployment(dA);
      main.process();

      Deployment dB = createSimpleDeployment("B");
      addAttachment(dB, null);
      main.deploy(dB);

      main.checkComplete(dA);

      main.undeploy(dB);

      try
      {
         main.checkComplete(dA);
         fail("Should not be here.");
      }
      catch (DeploymentException e)
      {
         assertInstanceOf(e, IncompleteDeploymentException.class);
View Full Code Here

      }
   }

   public void testComponentAllThenHalf() throws Exception
   {
      DeployerClient main = getComponentMainDeployer();

      Deployment dA = createSimpleDeployment("A");
      addComponentAttachment(dA, "xB");

      main.addDeployment(dA);
      main.process();

      Deployment dB = createSimpleDeployment("B");
      addComponentAttachment(dB, null);
      main.deploy(dB);

      main.checkComplete(dA);

      main.undeploy(dB);

      try
      {
         main.checkComplete(dA);
         fail("Should not be here.");
      }
      catch (DeploymentException e)
      {
         assertInstanceOf(e, IncompleteDeploymentException.class);
View Full Code Here

      super(name);
   }

   public void testADependsOnBAtClassLoaderCorrectOrder() throws Exception
   {
      DeployerClient main = getMainDeployer();
     
      Deployment a = createSimpleDeployment("A");
      TestDependencyMetaData depA = new TestDependencyMetaData("A");
      depA.addDependencyItem("B", DeploymentStages.CLASSLOADER);
      addMetaData(a, depA);
      main.addDeployment(a);

      Deployment b = createSimpleDeployment("B");
      main.addDeployment(b);

      main.process();

      assertEquals(AB, deployer1.deployed);
      assertEquals(NONE, deployer1.undeployed);
      assertEquals(BA, deployer2.deployed);
      assertEquals(NONE, deployer2.undeployed);
View Full Code Here

      assertEquals(NONE, deployer3.undeployed);
   }

   public void testADependsOnBAtClassLoaderWrongOrder() throws Exception
   {
      DeployerClient main = getMainDeployer();
     
      Deployment a = createSimpleDeployment("A");
      TestDependencyMetaData depA = new TestDependencyMetaData("A");
      depA.addDependencyItem("B", DeploymentStages.CLASSLOADER);
      addMetaData(a, depA);
      main.addDeployment(a);

      main.process();

      assertEquals(A, deployer1.deployed);
      assertEquals(NONE, deployer2.deployed);
      assertEquals(NONE, deployer3.deployed);

      Deployment b = createSimpleDeployment("B");
      main.addDeployment(b);

      main.process();

      assertEquals(AB, deployer1.deployed);
      assertEquals(NONE, deployer1.undeployed);
      assertEquals(BA, deployer2.deployed);
      assertEquals(NONE, deployer2.undeployed);
View Full Code Here

      assertEquals(NONE, deployer3.undeployed);
   }

   public void testADependsOnBAtClassLoaderUndeployANoB() throws Exception
   {
      DeployerClient main = getMainDeployer();
     
      Deployment a = createSimpleDeployment("A");
      TestDependencyMetaData depA = new TestDependencyMetaData("A");
      depA.addDependencyItem("B", DeploymentStages.CLASSLOADER);
      addMetaData(a, depA);
      main.addDeployment(a);

      main.process();

      assertEquals(A, deployer1.deployed);
      assertEquals(NONE, deployer1.undeployed);
      assertEquals(NONE, deployer2.deployed);
      assertEquals(NONE, deployer2.undeployed);
      assertEquals(NONE, deployer3.deployed);
      assertEquals(NONE, deployer3.undeployed);
     
      main.removeDeployment(a);
      main.process();

      assertEquals(A, deployer1.deployed);
      assertEquals(A, deployer1.undeployed);
      assertEquals(NONE, deployer2.deployed);
      assertEquals(NONE, deployer2.undeployed);
View Full Code Here

      return suite(VFSUndeployOrderClassLoaderUnitTestCase.class);
   }

   public void testUndeployOrder() throws Exception
   {
      DeployerClient mainDeployer = getMainDeployer();
      Version v1 = Version.parseVersion("1");
      Version v2 = Version.parseVersion("2");

      Deployment ad = createDeployment("A");
      addClassLoadingMetaData(ad, v1, true, A.class);
      assertDeploy(mainDeployer, ad);

      Deployment bd = createDeployment("B");
      addClassLoadingMetaData(bd, v2, true, B.class);
      assertDeploy(mainDeployer, bd);
      mainDeployer.checkComplete(bd);

      Deployment cd = createDeployment("C");
      ClassLoadingMetaData clmd = addClassLoadingMetaData(cd, null);
      addRequirePackage(clmd, A.class, new VersionRange(v1, true, v2, true));
      addRequirePackage(clmd, B.class, new VersionRange(v1, true, v2, true));
      assertDeploy(mainDeployer, cd);

      mainDeployer.checkComplete();

      mainDeployer.undeploy(bd);
      try
      {
         mainDeployer.checkComplete();
         fail("Should not be here!");
      }
      catch (DeploymentException e)
      {
         checkThrowable(IncompleteDeploymentException.class, e);
      }
      mainDeployer.undeploy(ad);
      try
      {
         mainDeployer.checkComplete();
         fail("Should not be here!");
      }
      catch (DeploymentException e)
      {
         checkThrowable(IncompleteDeploymentException.class, e);
      }
      mainDeployer.undeploy(cd);
      mainDeployer.checkComplete();
   }
View Full Code Here

      assertEquals(NONE, deployer3.undeployed);
   }

   public void testADependsOnBAtClassLoaderUndeployB() throws Exception
   {
      DeployerClient main = getMainDeployer();
     
      Deployment a = createSimpleDeployment("A");
      TestDependencyMetaData depA = new TestDependencyMetaData("A");
      depA.addDependencyItem("B", DeploymentStages.CLASSLOADER);
      addMetaData(a, depA);
      main.addDeployment(a);

      Deployment b = createSimpleDeployment("B");
      main.addDeployment(b);

      main.process();

      assertEquals(AB, deployer1.deployed);
      assertEquals(NONE, deployer1.undeployed);
      assertEquals(BA, deployer2.deployed);
      assertEquals(NONE, deployer2.undeployed);
      assertEquals(BA, deployer3.deployed);
      assertEquals(NONE, deployer3.undeployed);
     
      main.removeDeployment(b);
      main.process();

      assertEquals(AB, deployer1.deployed);
      assertEquals(B, deployer1.undeployed);
      assertEquals(BA, deployer2.deployed);
      assertEquals(AB, deployer2.undeployed);
View Full Code Here

      assertEquals(AB, deployer3.undeployed);
   }

   public void testADependsOnBAtClassLoaderRedeployB() throws Exception
   {
      DeployerClient main = getMainDeployer();
     
      Deployment a = createSimpleDeployment("A");
      TestDependencyMetaData depA = new TestDependencyMetaData("A");
      depA.addDependencyItem("B", DeploymentStages.CLASSLOADER);
      addMetaData(a, depA);
      main.addDeployment(a);

      Deployment b = createSimpleDeployment("B");
      main.addDeployment(b);

      main.process();

      assertEquals(AB, deployer1.deployed);
      assertEquals(NONE, deployer1.undeployed);
      assertEquals(BA, deployer2.deployed);
      assertEquals(NONE, deployer2.undeployed);
      assertEquals(BA, deployer3.deployed);
      assertEquals(NONE, deployer3.undeployed);
     
      main.removeDeployment(b);
      main.process();
     
      main.addDeployment(b);
      main.process();

      assertEquals(ABB, deployer1.deployed);
      assertEquals(B, deployer1.undeployed);
      assertEquals(BABA, deployer2.deployed);
      assertEquals(AB, deployer2.undeployed);
View Full Code Here

TOP

Related Classes of org.jboss.deployers.client.spi.DeployerClient

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.