Package org.jboss.deployers.spi.structure

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


         result = createRootDeploymentContext(deployment);
         if (result == null)
            throw new IllegalStateException("Root deployment context is null");
         result.setDeployment(deployment);

         ContextInfo contextInfo = metaData.getContext("");
         if (contextInfo == null)
            contextInfo = StructureMetaDataFactory.createContextInfo("", null);
         contextInfo.setPredeterminedManagedObjects(deployment.getPredeterminedManagedObjects());
         applyContextInfo(result, contextInfo);
      }
      catch (Throwable t)
      {
         throw DeploymentException.rethrowAsDeploymentException("Error populating deployment " + deployment.getName(), t);
View Full Code Here


         result = createRootDeploymentContext(deployment, metaData);
         if (result == null)
            throw new IllegalStateException("Root deployment context is null");
         result.setDeployment(deployment);

         ContextInfo contextInfo = metaData.getContext("");
         if (contextInfo == null)
            contextInfo = StructureMetaDataFactory.createContextInfo("", null);

         applyStructureMetaData(result, metaData);
         contextInfo.setPredeterminedManagedObjects(deployment.getPredeterminedManagedObjects());
         applyContextInfo(result, contextInfo);
      }
      catch (Throwable t)
      {
         throw DeploymentException.rethrowAsDeploymentException("Error populating deployment " + deployment.getName(), t);
View Full Code Here

      if (obj == this)
         return true;
      if (obj == null || obj instanceof ContextInfo == false)
         return false;
     
      ContextInfo other = (ContextInfo) obj;
      if (getPath().equals(other.getPath()) == false)
         return false;
      List<MetaDataEntry> thisMetaDataPath = getMetaDataPath();
      List<MetaDataEntry> otherMetaDataPath = other.getMetaDataPath();
      if (thisMetaDataPath.equals(otherMetaDataPath) == false)
         return false;
      List<ClassPathEntry> thisClassPath = getClassPath();
      List<ClassPathEntry> otherClassPath = other.getClassPath();
      if (thisClassPath == null)
         return otherClassPath == null;
      return thisClassPath.equals(otherClassPath);
   }
View Full Code Here

      this.resolver = resolver;
   }

   public boolean determineStructure(StructureContext structureContext) throws DeploymentException
   {
      ContextInfo context;
      boolean valid;
      boolean trace = log.isTraceEnabled();
      VirtualFile file = structureContext.getFile();
      try
      {
         if (file.isLeaf() == true || file.getName().endsWith(".ear") == false)
            return false;

         context = createContext(structureContext, "META-INF");
         context.setComparatorClassName(comparatorClassName);

         VirtualFile applicationXml = getMetaDataFile(file, "META-INF/application.xml");
         VirtualFile jbossAppXml = getMetaDataFile(file, "META-INF/jboss-app.xml");
         VirtualFile lib;
View Full Code Here

      this.includeWebInfInClasspath = includeWebInfInClasspath;
   }

   public boolean determineStructure(StructureContext structureContext) throws DeploymentException
   {
      ContextInfo context = null;
      VirtualFile file = structureContext.getFile();
      try
      {
         boolean trace = log.isTraceEnabled();
View Full Code Here

      if (obj == this)
         return true;
      if (obj == null || obj instanceof ContextInfo == false)
         return false;
     
      ContextInfo other = (ContextInfo) obj;
      if (getPath().equals(other.getPath()) == false)
         return false;
      List<MetaDataEntry> thisMetaDataPath = getMetaDataPath();
      List<MetaDataEntry> otherMetaDataPath = other.getMetaDataPath();
      if (thisMetaDataPath.equals(otherMetaDataPath) == false)
         return false;
      List<ClassPathEntry> thisClassPath = getClassPath();
      List<ClassPathEntry> otherClassPath = other.getClassPath();
      if (thisClassPath == null)
         return otherClassPath == null;
      return thisClassPath.equals(otherClassPath);
   }
View Full Code Here

   public void testRelativeOrder() throws Exception
   {
      DeployerClient main = getMainDeployer();
     
      Deployment parent = createSimpleDeployment("Parent");
      ContextInfo c1 = factory.addContext(parent, "C1");
      c1.setRelativeOrder(2);
      ContextInfo c2 = factory.addContext(parent, "C2");
      c2.setRelativeOrder(1);
      main.addDeployment(parent);

      main.process();

      assertEquals(PC2C1, deployer1.deployed);
View Full Code Here

   public void testComparator() throws Exception
   {
      DeployerClient main = getMainDeployer();
     
      AbstractDeployment parent = new AbstractDeployment("Parent");
      ContextInfo p = factory.addContext(parent, "");
      // Reverse the default comparison
      p.setComparatorClassName(TestDeploymentContextComparator.class.getName());
      factory.addContext(parent, "C1");
      factory.addContext(parent, "C2");
      main.addDeployment(parent);

      main.process();
View Full Code Here

   public void testAddContextPath()
   {
      DeploymentFactory factory = createDeploymentFactory();
      Deployment deployment = createDeployment();
      ContextInfo context = factory.addContext(deployment, "path");
      assertEquals("path", context.getPath());
      assertDefaultNonPath(context);
     
      assertContexts(deployment, context);
   }
View Full Code Here

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

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

      assertContexts(deployment, context);
   }
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.