Mail Archive Home | joram-commits List | April 2010 Index
| <-- Date Index | <-- Thread Index |
Verify that each server has a host defined.
--- trunk/designer/org.ow2.joram.design.deploy/src/org/ow2/joram/design/deploy/actions/DeployAction.java 2010-04-30 12:45:51 UTC (rev 3808)
+++ trunk/designer/org.ow2.joram.design.deploy/src/org/ow2/joram/design/deploy/actions/DeployAction.java 2010-04-30 13:17:48 UTC (rev 3809)
@@ -39,6 +39,7 @@
import org.ow2.joram.design.deploy.actions.wizard.DeployWizard;
import org.ow2.joram.design.model.joram.Config;
import org.ow2.joram.design.model.joram.JoramPackage;
+import org.ow2.joram.design.model.joram.ScalAgentServer;
public class DeployAction implements IObjectActionDelegate {
@@ -83,6 +84,12 @@
.getPath()), true);
final Config rootElement = (Config) resource.getContents().get(0);
+ for (ScalAgentServer server : rootElement.getServers()) {
+ if (server.getHost() == null) {
+ throw new Exception("Can't deploy when a server has no host defined.");
+ }
+ }
+
WizardDialog wizard = new WizardDialog(shell, new DeployWizard(rootElement, tree));
wizard.setHelpAvailable(false);
wizard.setPageSize(300, 250);
@@ -91,7 +98,6 @@
} catch (Exception e) {
MessageDialog.openError(shell, "Deploy Plug-in", "Deployment failed: "
+ e.getMessage());
- e.printStackTrace();
}
}
}
| <-- Date Index | <-- Thread Index |
Powered by MHonArc.
Copyright © 2006-2007, OW2 Consortium | contact | webmaster.