Package org.jboss.deployment.spi

Examples of org.jboss.deployment.spi.TargetModuleIDImpl


   /**
    * Deploy a given module
    */
   public void deploy(TargetModuleID targetModuleID) throws Exception
   {
      TargetModuleIDImpl moduleID = (TargetModuleIDImpl)targetModuleID;
      SerializableTargetModuleID smoduleID = new SerializableTargetModuleID(moduleID);
      Client client = getClient();
      log.info("Begin deploy: " + moduleID);
      transferDeployment(client, smoduleID);
      log.info("End deploy");
View Full Code Here


         {
            SerializableTargetModuleID id = modules[n];
            String moduleID = id.getModuleID();
            boolean isRunning = id.isRunning();
            ModuleType type = ModuleType.getModuleType(id.getModuleType());
            TargetModuleIDImpl tmid = new TargetModuleIDImpl(this, moduleID, null, isRunning, type);
            convertChildren(tmid, id);
            list.add(tmid);
         }

         TargetModuleID[] targetModuleIDs = new TargetModuleID[list.size()];
View Full Code Here

      {
         SerializableTargetModuleID id = children[n];
         String moduleID = id.getModuleID();
         boolean isRunning = id.isRunning();
         ModuleType type = ModuleType.getModuleType(id.getModuleType());
         TargetModuleIDImpl child = new TargetModuleIDImpl(this, moduleID, parent, isRunning, type);
         parent.addChildTargetModuleID(child);
         convertChildren(child, id);
      }
   }
View Full Code Here

    *
    * @throws Exception
    */
   public void testListStartStopModules() throws Exception
   {
      TargetModuleIDImpl child = null;
      TargetModuleIDImpl parent = null;

      // Get the deployment manager and the distribution targets
      DeploymentManager manager = getDeploymentManager();
      Target[] targets = manager.getTargets();
      assertEquals(1, targets.length);

      TargetModuleID[] modules = manager.getRunningModules(ModuleType.EAR, manager.getTargets());
      assertNull("no modules Available", modules);

      ProgressObject parentProgress = jsr88Deployment("deployment-ear.ear");
      assertServletAccess("custom-context");
      assertEjbEchoAccess();

      modules = manager.getRunningModules(ModuleType.EAR, manager.getTargets());
      assertNotNull(modules);
      assertEquals("one EAR module in the server", modules.length, 1);

      parent = (TargetModuleIDImpl) modules[0];
      assertTrue("wrong state", parent.isRunning());
      assertEquals("wrong type", parent.getModuleType(), ModuleType.EAR);
      assertEquals("EAR module have a jar and a war", parent.getChildTargetModuleID().length, 2);

      child = (TargetModuleIDImpl) parent.getChildTargetModuleID()[0];
      assertTrue("wrong state", child.isRunning());
      assertTrue("wrong type", child.getModuleType().equals(ModuleType.EJB) || child.getModuleType().equals(ModuleType.WAR));
      assertEquals("child have no child", child.getChildTargetModuleID().length, 0);

      child = (TargetModuleIDImpl) parent.getChildTargetModuleID()[1];
      assertTrue("wrong state", child.isRunning());
      assertTrue("wrong type " + child.getModuleType(), child.getModuleType().equals(ModuleType.EJB) || child.getModuleType().equals(ModuleType.WAR));
      assertEquals("child have no child", child.getChildTargetModuleID().length, 0);

      parentProgress = manager.stop(new TargetModuleID[] { parent });
      waitForCompletion(parentProgress.getDeploymentStatus());

      modules = manager.getNonRunningModules(ModuleType.EAR, manager.getTargets());
      assertNotNull(modules);
      assertEquals("one EAR module in the server", modules.length, 1);

      parent = (TargetModuleIDImpl) modules[0];
      assertFalse("wrong state", parent.isRunning());
      assertEquals("wrong type", parent.getModuleType(), ModuleType.EAR);
      assertEquals("EAR module have a jar and a war", parent.getChildTargetModuleID().length, 2);

      parentProgress = manager.start(new TargetModuleID[]{ parent });
      waitForCompletion(parentProgress.getDeploymentStatus());

      modules = manager.getRunningModules(ModuleType.EAR, manager.getTargets());
      assertNotNull(modules);
      assertEquals("one EAR module in the server", modules.length, 1);

      parent = (TargetModuleIDImpl) modules[0];
      assertTrue("wrong state", parent.isRunning());
      assertEquals("wrong type", parent.getModuleType(), ModuleType.EAR);
      assertEquals("EAR module have a jar and a war", parent.getChildTargetModuleID().length, 2);
      parentProgress = manager.undeploy(new TargetModuleID[]{ parent });
      waitForCompletion(parentProgress.getDeploymentStatus());

      modules = manager.getAvailableModules(ModuleType.EAR, manager.getTargets());
      assertNull("EAR must not be available", modules);
View Full Code Here

   /**
    * Deploy a given module
    */
   public void deploy(TargetModuleID targetModuleID) throws Exception
   {
      TargetModuleIDImpl moduleID = (TargetModuleIDImpl)targetModuleID;
      SerializableTargetModuleID smoduleID = new SerializableTargetModuleID(moduleID);
      Client client = getClient();
      log.info("Begin deploy: " + moduleID);
      transferDeployment(client, smoduleID);
      log.info("End deploy");
View Full Code Here

         {
            SerializableTargetModuleID id = modules[n];
            String moduleID = id.getModuleID();
            boolean isRunning = id.isRunning();
            ModuleType type = ModuleType.getModuleType(id.getModuleType());
            TargetModuleIDImpl tmid = new TargetModuleIDImpl(this, moduleID, null, isRunning, type);
            convertChildren(tmid, id);
            list.add(tmid);
         }

         TargetModuleID[] targetModuleIDs = new TargetModuleID[list.size()];
View Full Code Here

      {
         SerializableTargetModuleID id = children[n];
         String moduleID = id.getModuleID();
         boolean isRunning = id.isRunning();
         ModuleType type = ModuleType.getModuleType(id.getModuleType());
         TargetModuleIDImpl child = new TargetModuleIDImpl(this, moduleID, parent, isRunning, type);
         parent.addChildTargetModuleID(child);
         convertChildren(child, id);
      }
   }
View Full Code Here

TOP

Related Classes of org.jboss.deployment.spi.TargetModuleIDImpl

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.