in src/main/java/org/apache/openejb/cts/deploy/DeployTestUtil.java [780:808]
public boolean testTargetModuleID(File moduleArchive, File deploymentPlan,
String archiveType) {
try {
DeploymentManager dm = getDeploymentManager();
Target[] targets = dm.getTargets();
if (targets.length == 0)
return false;
Target targetToDeploy = targets[0];
TargetModuleID distributedModuleID = null;
distributedModuleID = distributeModuleArchive(
new Target[] { targetToDeploy }, moduleArchive, deploymentPlan);
// 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;
// Clean up....
// undeploy the module
undeployModule(distributedModuleID);
return true;
} catch (Exception ex) {
ex.printStackTrace();
return false;
}
}