Package org.jboss.deployers.client.spi

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


      assertEquals(6, deployer3.getUndeployOrder());
   }

   public void testDoubleCycle() throws Exception
   {
      DeployerClient main = createMainDeployer();

      TestFlowDeployer deployer2 = new TestFlowDeployer("A");
      deployer2.setInputs("test2");
      addDeployer(main, deployer2);

      TestFlowDeployer deployer3 = new TestFlowDeployer("B");
      addDeployer(main, deployer3);

      TestFlowDeployer deployer6 = new TestFlowDeployer("C");
      deployer6.setInputs("2ndcycle");
      addDeployer(main, deployer6);

      TestFlowDeployer deployer1 = new TestFlowDeployer("D");
      deployer1.setOutputs("test1");
      addDeployer(main, deployer1);

      TestFlowDeployer deployer4 = new TestFlowDeployer("E");
      addDeployer(main, deployer4);

      TestFlowDeployer deployer5 = new TestFlowDeployer("F");
      deployer5.setInputs("test1");
      deployer5.setOutputs("test2");
      addDeployer(main, deployer5);

      TestFlowDeployer deployer7 = new TestFlowDeployer("G");
      addDeployer(main, deployer7);

      TestFlowDeployer deployer8 = new TestFlowDeployer("H");
      deployer8.setOutputs("2ndcycle");
      addDeployer(main, deployer8);

      Deployment deployment = createSimpleDeployment("DoubleCycle");
      main.addDeployment(deployment);
      main.process();

      assertEquals(1, deployer3.getDeployOrder());
      assertEquals(2, deployer8.getDeployOrder());
      assertEquals(3, deployer6.getDeployOrder());
      assertEquals(4, deployer1.getDeployOrder());
      assertEquals(5, deployer4.getDeployOrder());
      assertEquals(6, deployer5.getDeployOrder());
      assertEquals(7, deployer2.getDeployOrder());
      assertEquals(8, deployer7.getDeployOrder());
      assertEquals(-1, deployer3.getUndeployOrder());
      assertEquals(-1, deployer8.getUndeployOrder());
      assertEquals(-1, deployer6.getUndeployOrder());
      assertEquals(-1, deployer1.getUndeployOrder());
      assertEquals(-1, deployer4.getUndeployOrder());
      assertEquals(-1, deployer5.getUndeployOrder());
      assertEquals(-1, deployer2.getUndeployOrder());
      assertEquals(-1, deployer7.getUndeployOrder());

      main.removeDeployment(deployment);
      main.process();

      assertEquals(1, deployer3.getDeployOrder());
      assertEquals(2, deployer8.getDeployOrder());
      assertEquals(3, deployer6.getDeployOrder());
      assertEquals(4, deployer1.getDeployOrder());
      assertEquals(5, deployer4.getDeployOrder());
      assertEquals(6, deployer5.getDeployOrder());
      assertEquals(7, deployer2.getDeployOrder());
      assertEquals(8, deployer7.getDeployOrder());
      assertEquals(16, deployer3.getUndeployOrder());
      assertEquals(15, deployer8.getUndeployOrder());
      assertEquals(14, deployer6.getUndeployOrder());
      assertEquals(13, deployer1.getUndeployOrder());
      assertEquals(12, deployer4.getUndeployOrder());
      assertEquals(11, deployer5.getUndeployOrder());
      assertEquals(10, deployer2.getUndeployOrder());
      assertEquals(9, deployer7.getUndeployOrder());

      main.addDeployment(deployment);
      main.process();

      assertEquals(17, deployer3.getDeployOrder());
      assertEquals(18, deployer8.getDeployOrder());
      assertEquals(19, deployer6.getDeployOrder());
      assertEquals(20, deployer1.getDeployOrder());
View Full Code Here


      assertEquals(9, deployer7.getUndeployOrder());
   }

   public void testOrderedThenFlowWithPassThrough() throws Exception
   {
      DeployerClient main = createMainDeployer();

      TestFlowDeployer deployer4 = new TestFlowDeployer("4");
      deployer4.setInputs("test");
      addDeployer(main, deployer4);
     
      TestFlowDeployer deployer3 = new TestFlowDeployer("3");
      deployer3.setRelativeOrder(3);
      deployer3.setInputs("test");
      deployer3.setOutputs("test");
      addDeployer(main, deployer3);
     
      TestFlowDeployer deployer2 = new TestFlowDeployer("2");
      deployer2.setRelativeOrder(2);
      addDeployer(main, deployer2);

      TestFlowDeployer deployer1 = new TestFlowDeployer("1");
      deployer1.setRelativeOrder(1);
      addDeployer(main, deployer1);

      Deployment deployment = createSimpleDeployment("orderedThenFlowWithPassThrough");
      main.addDeployment(deployment);
      main.process();

      assertEquals(1, deployer1.getDeployOrder());
      assertEquals(2, deployer2.getDeployOrder());
      assertEquals(3, deployer3.getDeployOrder());
      assertEquals(4, deployer4.getDeployOrder());
      assertEquals(-1, deployer1.getUndeployOrder());
      assertEquals(-1, deployer2.getUndeployOrder());
      assertEquals(-1, deployer3.getUndeployOrder());
      assertEquals(-1, deployer4.getUndeployOrder());

      main.removeDeployment(deployment);
      main.process();

      assertEquals(1, deployer1.getDeployOrder());
      assertEquals(2, deployer2.getDeployOrder());
      assertEquals(3, deployer3.getDeployOrder());
      assertEquals(4, deployer4.getDeployOrder());
      assertEquals(8, deployer1.getUndeployOrder());
      assertEquals(7, deployer2.getUndeployOrder());
      assertEquals(6, deployer3.getUndeployOrder());
      assertEquals(5, deployer4.getUndeployOrder());

      main.addDeployment(deployment);
      main.process();

      assertEquals(9, deployer1.getDeployOrder());
      assertEquals(10, deployer2.getDeployOrder());
      assertEquals(11, deployer3.getDeployOrder());
      assertEquals(12, deployer4.getDeployOrder());
View Full Code Here

      assertEquals(5, deployer4.getUndeployOrder());
   }

   public void testWebBeansOrder() throws Exception
   {
      DeployerClient main = createMainDeployer();

      TestFlowDeployer mcfcld = new TestFlowDeployer("ManagedConnectionFactory");
      mcfcld.setInputs("ManagedConnectionFactoryDeploymentGroup");
      mcfcld.setOutputs("CLMD");
      addDeployer(main, mcfcld);
View Full Code Here

      super(name);
   }

   public void testNoSubDeploymentClassLoader() throws Exception
   {
      DeployerClient deployer = getMainDeployer();

      Deployment deployment = createSimpleDeployment("top");
      addClassLoadingMetaData(deployment, "top", null, A.class);
     
      addChild(deployment, "sub");
View Full Code Here

      assertNoDomain("top/sub");
   }

   public void testSubDeploymentClassLoaderSynthetic() throws Exception
   {
      DeployerClient deployer = getMainDeployer();

      Deployment deployment = createSimpleDeployment("top");
      addClassLoadingMetaData(deployment, "top", null, A.class);
     
      ContextInfo sub = addChild(deployment, "sub");
View Full Code Here

      assertEquals(Arrays.asList("top/sub", "top"), deployer2.undeployed);
   }

   public void testSubDeploymentClassLoaderSpecifiedDefaultDomain() throws Exception
   {
      DeployerClient deployer = getMainDeployer();

      Deployment deployment = createSimpleDeployment("top");
      ClassLoadingMetaData top = addClassLoadingMetaData(deployment, "top", null, A.class);
      top.setImportAll(true);
     
View Full Code Here

      assertEquals(Arrays.asList("top/sub", "top"), deployer2.undeployed);
   }

   public void testSubDeploymentClassLoaderSpecifiedOtherDomain() throws Exception
   {
      DeployerClient deployer = getMainDeployer();

      Deployment deployment = createSimpleDeployment("top");
      ClassLoadingMetaData top = addClassLoadingMetaData(deployment, "top", null, A.class);
      top.setImportAll(true);
     
View Full Code Here

      assertEquals(Arrays.asList("top/sub", "top"), deployer2.undeployed);
   }

   public void testMultipleSubDeploymentClassLoader() throws Exception
   {
      DeployerClient deployer = getMainDeployer();

      Deployment deployment = createSimpleDeployment("top");
      addClassLoadingMetaData(deployment, "top", null, A.class);
     
      ContextInfo sub1 = addChild(deployment, "sub1");
View Full Code Here

      assertNoDomain("top/sub2");
   }

   public void testSubDeploymentClassLoaderParentLast() throws Exception
   {
      DeployerClient deployer = getMainDeployer();

      Deployment deployment = createSimpleDeployment("top");
      addClassLoadingMetaData(deployment, "top", null, A.class);
     
      ContextInfo sub = addChild(deployment, "sub");
View Full Code Here

      assertEquals(Arrays.asList("top/sub", "top"), deployer2.undeployed);
   }

   public void testMultipleSubDeploymentClassLoaderSpecifiedDomain() throws Exception
   {
      DeployerClient deployer = getMainDeployer();

      Deployment deployment = createSimpleDeployment("top");
      addClassLoadingMetaData(deployment, "top", null);
     
      ContextInfo sub1 = addChild(deployment, "sub1");
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.