Package org.jboss.deployers.structure.spi.main

Examples of org.jboss.deployers.structure.spi.main.MainDeployerStructure


    * @throws IllegalStateException when the units cannot be located
    */
   public List<DeploymentUnit> getDeploymentUnits()
   {
      ArrayList<DeploymentUnit> result = new ArrayList<DeploymentUnit>();
      MainDeployerStructure structure = (MainDeployerStructure) mainDeployer;
      for (VFSDeployment deployment : deployments)
      {
         DeploymentUnit unit = structure.getDeploymentUnit(deployment.getName());
         if (unit == null)
            throw new IllegalStateException("DeploymentUnit not found " + deployment.getName());
         result.add(unit);
      }
      return result;
View Full Code Here


   }

   public void testInMemory() throws Exception
   {
      DeployerClient mainDeployer = getMainDeployer();
      MainDeployerStructure main = (MainDeployerStructure) mainDeployer;

      Version v1 = Version.parseVersion("1");

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

      VFSDeploymentUnit unit = (VFSDeploymentUnit) main.getDeploymentUnit("A");
      VirtualFile file = unit.getAttachment(InMemoryClassesDeployer.DYNAMIC_CLASS_KEY, VirtualFile.class);
      assertNotNull(file);
      assertTrue("dynamic classes should be in the classpath", unit.getClassPath().contains(file));

      URL root = unit.getAttachment(InMemoryClassesDeployer.DYNAMIC_CLASS_URL_KEY, URL.class);
View Full Code Here

   }

   public void testHostNameCreator() throws Exception
   {
      DeployerClient mainDeployer = getMainDeployer();
      MainDeployerStructure main = (MainDeployerStructure) mainDeployer;

      Deployment ad = createDeployment("A");
      Version v1 = Version.parseVersion("1");
      ClassLoadingMetaData clmd = addClassLoadingMetaData(ad, v1, true, A.class);
      clmd.setBlackListable(false);

      inMemoryClassesDeployer.setHostNameCreator(new DeploymentHostNameCreator());
      try
      {
         assertDeploy(mainDeployer, ad);

         VFSDeploymentUnit unit = (VFSDeploymentUnit) main.getDeploymentUnit("A");
         URL root = unit.getAttachment(InMemoryClassesDeployer.DYNAMIC_CLASS_URL_KEY, URL.class);
         assertNotNull(root);
         assertEquals("vfsmemory://in-memory-test-classes", root.toExternalForm());
      }
      finally
View Full Code Here

     
      DeployerClient main = assertBean("MainDeployer", DeployerClient.class);
      main.deploy(deployment);
      try
      {
         MainDeployerStructure mds = (MainDeployerStructure) main;
         DeploymentUnit unit = mds.getDeploymentUnit(deployment.getName());
         ClassLoader cl = unit.getClassLoader();
         assertNoResource("a/b/c/test-resource-deployment5", cl);
      }
      finally
      {
View Full Code Here

        
         DeployerClient main = assertBean("MainDeployer", DeployerClient.class);
         main.deploy(deployment);
         try
         {
            MainDeployerStructure mds = (MainDeployerStructure) main;
            DeploymentUnit unit = mds.getDeploymentUnit(deployment.getName());
            ClassLoader cl = unit.getClassLoader();
            assertGetResource("a/b/c/test-resource-deployment5", cl);
         }
         finally
         {
View Full Code Here

      assertDeploy(context);
      ControllerContext ctx = controller.getInstalledContext("Test");

      ScopeInfo scopeInfo = ctx.getScopeInfo();
     
      MainDeployerStructure mds = (MainDeployerStructure) main;
      DeploymentUnit unit = mds.getDeploymentUnit("KernelDeployerTest", true);
      DeploymentUnit component = unit.getComponent("Test");
      assertScopeKeys(component.getScope(), scopeInfo.getScope());
      assertScopeKeys(component.getMutableScope(), scopeInfo.getMutableScope());
     
      MetaData md = ctx.getScopeInfo().getMetaData();
View Full Code Here

      super(name);
   }

   protected StructureModificationChecker createStructureModificationChecker()
   {
      MainDeployerStructure mainDeployerStructure = getMainDeployerStructure();
      VirtualFileFilter filter = createFilter();
      VirtualFileFilter recurseFilter = createRecurseFilter();
      SynchAdapter synchAdapter = createSynchAdapter();

      MetaDataStructureModificationChecker mdsmc = new MetaDataStructureModificationChecker(mainDeployerStructure);
View Full Code Here

      super(name);
   }

   protected StructureModificationChecker createStructureModificationChecker()
   {
      MainDeployerStructure mainDeployer = getMainDeployerStructure();
      VirtualFileFilter filter = createFilter();
      return createStructureModificationChecker(mainDeployer, filter);
   }
View Full Code Here

    * @throws IllegalStateException when the units cannot be located
    */
   public List<DeploymentUnit> getDeploymentUnits()
   {
      ArrayList<DeploymentUnit> result = new ArrayList<DeploymentUnit>();
      MainDeployerStructure structure = (MainDeployerStructure) mainDeployer;
      for (VFSDeployment deployment : deployments)
      {
         DeploymentUnit unit = structure.getDeploymentUnit(deployment.getName());
         if (unit == null)
            throw new IllegalStateException("DeploymentUnit not found " + deployment.getName());
         result.add(unit);
      }
      return result;
View Full Code Here

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

      MainDeployerStructure structure = (MainDeployerStructure) 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.main.MainDeployerStructure

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.