Package org.jboss.deployers.structure.spi

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


   /**
    * Verifies leading zeros are ignored.
    */
   public void testLeadingZerosIgnored()
   {
      DeploymentContext first = new TestDeploymentContext("001test.ear");
      DeploymentContext second = new TestDeploymentContext("21test.ear");
      DeploymentContext third = new TestDeploymentContext("0132test.ear");
     
     
   }
View Full Code Here


   /**
    * Verifies straight-forward ordering.
    */
   public void testPrefixOrdering()
   {
      DeploymentContext first = new TestDeploymentContext("1test.ear");
      DeploymentContext second = new TestDeploymentContext("21test.ear");
      DeploymentContext third = new TestDeploymentContext("132test.ear");
     
      ValidateFirstSecondThird(first, second, third);
   }
View Full Code Here

   /**
    * Verifies that a prefix tie is ordered based on the suffix.
    */
   public void testSuffixFallback()
   {
      DeploymentContext first = new TestDeploymentContext("123test.sar");
      DeploymentContext second = new TestDeploymentContext("123test.ear");
     
      assertTrue("Second comes before first", comparator.compare(first, second) < 0);
      assertTrue("First comes after second", comparator.compare(second, first) > 0);
   }
View Full Code Here

      prefixComparator.setSuffixOrder(suffixOrder);
      prefixComparator.create();
     
      Comparator<DeploymentContext> changedSuffix = prefixComparator;
     
      DeploymentContext first = new TestDeploymentContext("test.ear");
      DeploymentContext second = new TestDeploymentContext("test.sar");
     
      assertTrue("Second comes before first", changedSuffix.compare(first, second) < 0);
      assertTrue("First comes after second", changedSuffix.compare(second, first) > 0);
   }
View Full Code Here

    * {@link org.jboss.system.deployers.LegacyPrefixDeploymentContextComparator}
    * javadoc.
    */
   public void testJavaDocExample()
   {
      DeploymentContext first = new TestDeploymentContext("test.sar");
      DeploymentContext second = new TestDeploymentContext("component.ear");
      DeploymentContext third = new TestDeploymentContext("001test.jar");
      DeploymentContext fourth = new TestDeploymentContext("5test.rar");
      DeploymentContext fifth = new TestDeploymentContext("5foo.jar");
      DeploymentContext sixth = new TestDeploymentContext("120bar.jar");
     
      assertTrue("Second comes before first", comparator.compare(first, second) < 0);
      assertTrue("Third comes before second", comparator.compare(second, third) < 0);
      assertTrue("Fourth comes before third", comparator.compare(third, fourth) < 0);
      assertTrue("Fifth comes before fourth", comparator.compare(fourth, fifth) < 0);
View Full Code Here

   /**
    * Verifies non-prefixed deployments occur before prefixed deployments
    */
   public void testNonPrefixPrefixOrdering()
   {
      DeploymentContext first = new TestDeploymentContext("test.sar");
      DeploymentContext second = new TestDeploymentContext("test.ear");
      DeploymentContext third = new TestDeploymentContext("132test.ear");
     
      ValidateFirstSecondThird(first, second, third);
   }
View Full Code Here

   protected VFSDeploymentContext getDeploymentContext(String name)
   {
      if (mainDeployer == null)
         throw new IllegalStateException("Null main deployer.");

      DeploymentContext deploymentContext = mainDeployer.getDeploymentContext(name);
      if (deploymentContext == null || deploymentContext instanceof VFSDeploymentContext == false)
         return null;

      return (VFSDeploymentContext)deploymentContext;
   }
View Full Code Here

      }

      DeploymentUnit targetUnit = null;
      try
      {
         DeploymentContext ctx = server.getDeploymentContext(target.toString());
         targetUnit = ctx.getDeploymentUnit();
      }
      catch (Exception e)
      {
         log.warn("Got Exception when looking for DeploymentUnit: " + e);
         return null;
View Full Code Here

      }

      DeploymentUnit targetUnit = null;
      try
      {
         DeploymentContext ctx = server.getDeploymentContext(target.toString());
         targetUnit = ctx.getDeploymentUnit();
      }
      catch (Exception e)
      {
         log.warn("Got Exception when looking for DeploymentUnit: " + e);
         return null;
View Full Code Here

      String name = contextMap.get(url);
      if (name == null)
         return null;

      MainDeployerInternals structure = (MainDeployerInternals) delegate;
      DeploymentContext dc = structure.getDeploymentContext(name);
      log.debug("getDeploymentContext, url="+url+", dc="+dc);
      return dc;
   }
View Full Code Here

TOP

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

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.