src/main/java/org/apache/openejb/cts/deploy/DeployTestUtil.java [518:562]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      File deploymentPlan, String archiveType) throws Exception {
    DeploymentManager dm = getDeploymentManager();
    Target[] targets = dm.getTargets();
    if (targets.length == 0)
      return false;
    Target targetToDeploy = targets[0];
    TargetModuleID distributedModuleID = null;
    TargetModuleID[] moduleIDsBeforeDistribute = dm
        .getAvailableModules(moduleType, new Target[] { targetToDeploy });
    if (archiveType.equals(FILE_ARCHIVE)) {
      distributedModuleID = distributeModuleArchive(
          new Target[] { targetToDeploy }, moduleArchive, deploymentPlan);
    } else {
      distributedModuleID = distributeModuleStream(
          new Target[] { targetToDeploy }, moduleType,
          new FileInputStream(moduleArchive),
          new FileInputStream(deploymentPlan), true);
    }
    // If the distributedModuleID == null, the test is failed
    if (distributedModuleID == null)
      return false;
    // Check if distriburtedModuleID has the same target as deployed target
    if (!distributedModuleID.getTarget().getName()
        .equals(targetToDeploy.getName()))
      return false;
    TargetModuleID[] moduleIDsAfterDistribute = dm
        .getAvailableModules(moduleType, new Target[] { targetToDeploy });
    boolean moduleExistsBeforeDistribute = checkIfModuleExists(
        distributedModuleID, moduleIDsBeforeDistribute);
    boolean moduleExistsAfterDistribute = checkIfModuleExists(
        distributedModuleID, moduleIDsAfterDistribute);
    if (!((!moduleExistsBeforeDistribute) && moduleExistsAfterDistribute))
      return false;

    // start the module
    TargetModuleID startedModuleID = null;
    startedModuleID = startModule(distributedModuleID);
    if (startedModuleID == null)
      return false;
    // Check that the startedModuleID is same as deployed module id
    if (!startedModuleID.getModuleID()
        .equals(distributedModuleID.getModuleID()))
      return false;
    TargetModuleID[] runningModules = dm.getRunningModules(moduleType,
        new Target[] { targetToDeploy });
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/main/java/org/apache/openejb/cts/deploy/DeployTestUtil.java [648:692]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      File deploymentPlan, String archiveType) throws Exception {
    DeploymentManager dm = getDeploymentManager();
    Target[] targets = dm.getTargets();
    if (targets.length == 0)
      return false;
    Target targetToDeploy = targets[0];
    TargetModuleID distributedModuleID = null;
    TargetModuleID[] moduleIDsBeforeDistribute = dm
        .getAvailableModules(moduleType, new Target[] { targetToDeploy });
    if (archiveType.equals(FILE_ARCHIVE)) {
      distributedModuleID = distributeModuleArchive(
          new Target[] { targetToDeploy }, moduleArchive, deploymentPlan);
    } else {
      distributedModuleID = distributeModuleStream(
          new Target[] { targetToDeploy }, moduleType,
          new FileInputStream(moduleArchive),
          new FileInputStream(deploymentPlan), true);
    }
    // If the distributedModuleID == null, the test is failed
    if (distributedModuleID == null)
      return false;
    // Check if distriburtedModuleID has the same target as deployed target
    if (!distributedModuleID.getTarget().getName()
        .equals(targetToDeploy.getName()))
      return false;
    TargetModuleID[] moduleIDsAfterDistribute = dm
        .getAvailableModules(moduleType, new Target[] { targetToDeploy });
    boolean moduleExistsBeforeDistribute = checkIfModuleExists(
        distributedModuleID, moduleIDsBeforeDistribute);
    boolean moduleExistsAfterDistribute = checkIfModuleExists(
        distributedModuleID, moduleIDsAfterDistribute);
    if (!((!moduleExistsBeforeDistribute) && moduleExistsAfterDistribute))
      return false;

    // start the module
    TargetModuleID startedModuleID = null;
    startedModuleID = startModule(distributedModuleID);
    if (startedModuleID == null)
      return false;
    // Check that the startedModuleID is same as deployed module id
    if (!startedModuleID.getModuleID()
        .equals(distributedModuleID.getModuleID()))
      return false;
    TargetModuleID[] runningModules = dm.getRunningModules(moduleType,
        new Target[] { targetToDeploy });
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



