Package org.jboss.metadata.ear.spec

Examples of org.jboss.metadata.ear.spec.ModuleMetaData


      DeploymentUnit unit = getDeploymentUnitProxy(duih);
      testee.deploy(unit);
      assertEquals(TEST, md.getModuleName());
      assertEquals(TEST, duih.getModuleName(NamedModule.class));
     
      ModuleMetaData modmd = getModuleMetaData(duih);
      assertEquals(TEST, modmd.getUniqueName());
   }
View Full Code Here


      {
         assertEquals("Module name correct for " + type, TEST, duih.getModuleName(type));
      }
      assertEquals(TEST, duih.getModuleName(NamedModule.class));
     
      ModuleMetaData modmd = getModuleMetaData(duih);
      assertEquals(TEST, modmd.getUniqueName());
   }
View Full Code Here

      DeploymentUnit unit = getDeploymentUnitProxy(duih);
      testee.deploy(unit);
      assertEquals(SIMPLE_TRIMMED_PATH, getSingleAttachment(duih).getModuleName());
      assertEquals(SIMPLE_TRIMMED_PATH, duih.getModuleName(NamedModule.class));
     
      ModuleMetaData modmd = getModuleMetaData(duih);
      assertEquals(SIMPLE_TRIMMED_PATH, modmd.getUniqueName());
   }
View Full Code Here

      {
         assertEquals("Module name correct for " + type, SIMPLE_TRIMMED_PATH, duih.getModuleName(type));
      }
      assertEquals(SIMPLE_TRIMMED_PATH, duih.getModuleName(NamedModule.class));
     
      ModuleMetaData modmd = getModuleMetaData(duih);
      assertEquals(SIMPLE_TRIMMED_PATH, modmd.getUniqueName());
   }
View Full Code Here

   {
      DUIH duih = getDUIHWithParent(false);
      NamedModule md = getSingleAttachment(duih);
      md.setModuleName(TEST);
      ModulesMetaData modules = getModulesMetaData(duih);
      ModuleMetaData conflict = new ModuleMetaData();
      conflict.setName(SIMPLE_DU_JAR_PATH);
      conflict.setUniqueName(TEST);
      modules.add(conflict);
     
      DeploymentUnit unit = getDeploymentUnitProxy(duih);
      testee.deploy(unit);
      assertEquals(SIMPLE_TRIMMED_PATH, md.getModuleName());
      assertEquals(SIMPLE_TRIMMED_PATH, duih.getModuleName(NamedModule.class));
     
      ModuleMetaData modmd = getModuleMetaData(duih);
      assertEquals(SIMPLE_TRIMMED_PATH, modmd.getUniqueName());
     
      assertEquals(TEST, conflict.getUniqueName());
   }
View Full Code Here

  
   public void testNoConfiguredNameConflict() throws DeploymentException
   {
      DUIH duih = getDUIHWithParent(false);
      ModulesMetaData modules = getModulesMetaData(duih);
      ModuleMetaData conflict = new ModuleMetaData();
      conflict.setName(SIMPLE_DU_JAR_PATH);
      conflict.setUniqueName(SIMPLE_TRIMMED_PATH);
      modules.add(conflict);
     
      DeploymentUnit unit = getDeploymentUnitProxy(duih);
      testee.deploy(unit);
      assertEquals(SIMPLE_DU_WAR_PATH, getSingleAttachment(duih).getModuleName());
      assertEquals(SIMPLE_DU_WAR_PATH, duih.getModuleName(NamedModule.class));
     
      ModuleMetaData modmd = getModuleMetaData(duih);
      assertEquals(SIMPLE_DU_WAR_PATH, modmd.getUniqueName());
     
      assertEquals(SIMPLE_TRIMMED_PATH, conflict.getUniqueName());
   }
View Full Code Here

      DUIH duih = getDUIHWithParent(false);
      NamedModule md = getSingleAttachment(duih);
      md.setModuleName(TEST);
     
      ModulesMetaData modules = getModulesMetaData(duih);
      ModuleMetaData conflict = new ModuleMetaData();
      conflict.setName(SIMPLE_DU_JAR_PATH);
      conflict.setUniqueName(TEST);
      modules.add(conflict);
     
      ModuleMetaData conflict2 = new ModuleMetaData();
      conflict2.setName(SIMPLE_DU_RAR_PATH);
      conflict2.setUniqueName(SIMPLE_TRIMMED_PATH);
      modules.add(conflict2);
     
      ModuleMetaData conflict3 = new ModuleMetaData();
      conflict3.setName("pathological.war");
      conflict3.setUniqueName(SIMPLE_DU_WAR_PATH);
      modules.add(conflict3);
     
      ModuleMetaData conflict4 = new ModuleMetaData();
      conflict4.setName("more-pathological.war");
      conflict4.setUniqueName(SIMPLE_TRIMMED_PATH + "-1");
      modules.add(conflict4);
     
      String expected = "test-1";
     
      DeploymentUnit unit = getDeploymentUnitProxy(duih);
      testee.deploy(unit);
      assertEquals(expected, md.getModuleName());
      assertEquals(expected, duih.getModuleName(NamedModule.class));
     
      ModuleMetaData modmd = getModuleMetaData(duih);
      assertEquals(expected, modmd.getUniqueName());
   }
View Full Code Here

   public void testNoConfiguredNamePathologicalConflict() throws DeploymentException
   {
      DUIH duih = getDUIHWithParent(false);
     
      ModulesMetaData modules = getModulesMetaData(duih);
      ModuleMetaData conflict = new ModuleMetaData();
      conflict.setName(SIMPLE_DU_JAR_PATH);
      conflict.setUniqueName(TEST);
      modules.add(conflict);
     
      ModuleMetaData conflict2 = new ModuleMetaData();
      conflict2.setName(SIMPLE_DU_RAR_PATH);
      conflict2.setUniqueName(SIMPLE_TRIMMED_PATH);
      modules.add(conflict2);
     
      ModuleMetaData conflict3 = new ModuleMetaData();
      conflict3.setName("pathological.war");
      conflict3.setUniqueName(SIMPLE_DU_WAR_PATH);
      modules.add(conflict3);
     
      ModuleMetaData conflict4 = new ModuleMetaData();
      conflict4.setName("more-pathological.war");
      conflict4.setUniqueName(SIMPLE_TRIMMED_PATH + "-1");
      modules.add(conflict4);
     
      String expected = SIMPLE_TRIMMED_PATH + "-2";
     
      DeploymentUnit unit = getDeploymentUnitProxy(duih);
      testee.deploy(unit);
      assertEquals(expected, getSingleAttachment(duih).getModuleName());
      assertEquals(expected, duih.getModuleName(NamedModule.class));
     
      ModuleMetaData modmd = getModuleMetaData(duih);
      assertEquals(expected, modmd.getUniqueName());
   }
View Full Code Here

      ModulesMetaData modsmd = appmd.getModules();
     
      DUIH war = getSingleAttachmentDUIH(); // this does most setup for war
      war.parent = parent;
      war.relativePath = SIMPLE_DU_WAR_PATH;
      ModuleMetaData warmod = appmd.getModule(SIMPLE_DU_WAR_PATH);
     
      DUIH jar = new DUIH();
      jar.attachments.put(JBossMetaData.class, new JBossMetaData());
      jar.parent = parent;
      jar.relativePath = SIMPLE_DU_JAR_PATH;
      jar.simpleName = SIMPLE_DU_JAR;
      ModuleMetaData jarmod = new ModuleMetaData();
      jarmod.setName(SIMPLE_DU_JAR_PATH);
      modsmd.add(jarmod);
     
      DUIH appClient = new DUIH();
      appClient.attachments.put(JBossClientMetaData.class, new JBossClientMetaData());
      appClient.parent = parent;
      appClient.relativePath = SIMPLE_DU_APPCLIENT_PATH;
      appClient.simpleName = SIMPLE_DU_APPCLIENT;
      ModuleMetaData appclientmod = new ModuleMetaData();
      appclientmod.setName(SIMPLE_DU_APPCLIENT_PATH);
      modsmd.add(appclientmod);
     
      // Make assertions simple by not letting anything have SIMPLE_TRIMMED_PATH
      ModuleMetaData conflict = new ModuleMetaData();
      conflict.setName("conflict.war");
      conflict.setUniqueName(SIMPLE_TRIMMED_PATH);
      modsmd.add(conflict);
     
      ExecutorService executor = Executors.newFixedThreadPool(3);
     
      CountDownLatch startLatch = new CountDownLatch(4);
View Full Code Here

   {
      JBossAppMetaData appmd = new JBossAppMetaData();
      appmd.setModules(new ModulesMetaData());
      if (addModule)
      {
         ModuleMetaData modmd = new ModuleMetaData();
         modmd.setName(SIMPLE_DU_WAR_PATH);
         appmd.getModules().add(modmd);        
      }
      return appmd;
   }
View Full Code Here

TOP

Related Classes of org.jboss.metadata.ear.spec.ModuleMetaData

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.