Permalink
Browse files

deploymod examples

  • Loading branch information...
1 parent cdb4fa2 commit 86a11812fe2f9a11c0a2c3e06695f33c3a9848da @purplefox purplefox committed Jul 31, 2012
@@ -0,0 +1,9 @@
+package deploymod
+
+println "Deploying module"
+
+conf = ["some-var" : "hello"]
+
+container.deployModule("org.foo.MyMod-v1.0", conf, 1) { deploymentID ->
+ println "This gets called when deployment is complete, deployment id is $deploymentID"
+}
@@ -0,0 +1,4 @@
+load("vertx.js")
+
+console.log("in MyMod!")
+console.log("some-var is " + vertx.config['some-var'])
@@ -0,0 +1,3 @@
+{
+ "main": "app.js"
+}
@@ -0,0 +1,18 @@
+import org.vertx.java.deploy.Verticle;
+import org.vertx.java.core.json.JsonObject;
+import org.vertx.java.core.Handler;
+
+public class Deploy extends Verticle {
+
+ public void start() {
+ System.out.println("Deploying module");
+
+ JsonObject conf = new JsonObject().putString("some-var", "hello");
+
+ container.deployModule("org.foo.MyMod-v1.0", conf, 1, new Handler<String>() {
+ public void handle(String deploymentID) {
+ System.out.println("This gets called when deployment is complete, deployment id is " + deploymentID);
+ }
+ });
+ }
+}
@@ -0,0 +1,4 @@
+load("vertx.js")
+
+console.log("in MyMod!")
+console.log("some-var is " + vertx.config['some-var'])
@@ -0,0 +1,3 @@
+{
+ "main": "app.js"
+}
@@ -0,0 +1,9 @@
+load("vertx.js");
+
+console.log("Deploying module");
+
+var conf = {"some-var" : "hello"};
+
+vertx.deployModule("org.foo.MyMod-v1.0", conf, 1, function(deploymentID) {
+ console.log("This gets called when deployment is complete, deployment id is " + deploymentID);
+});
@@ -0,0 +1,4 @@
+load("vertx.js")
+
+console.log("in MyMod!")
+console.log("some-var is " + vertx.config['some-var'])
@@ -0,0 +1,3 @@
+{
+ "main": "app.js"
+}
@@ -172,4 +172,4 @@ function splitJvmOpts() {
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $VERTX_OPTS
-exec "$JAVACMD" "${JVM_OPTS[@]}" -Dvertx.install=$APP_HOME -Djava.util.logging.config.file=$APP_HOME/src/dist/conf/logging.properties -Djruby.home=$JRUBY_HOME -Djython.home=$JYTHON_HOME -classpath "$CLASSPATH" c "$@"
+exec "$JAVACMD" "${JVM_OPTS[@]}" -Dvertx.install=$APP_HOME -Djava.util.logging.config.file=$APP_HOME/src/dist/conf/logging.properties -Djruby.home=$JRUBY_HOME -Djython.home=$JYTHON_HOME -classpath "$CLASSPATH" org.vertx.java.deploy.impl.cli.Starter "$@"

0 comments on commit 86a1181

Please sign in to comment.