And as for the deployment ID, if you want separate deployment IDs for separate module/verticle instances, you can just deploy instances separately (one at a time) and thus the resulting deployment ID (from deployModule or deployVerticle) is unique to that instance.
// Deploy a verticle
container.deployVerticle("SomeVerticle.java", new Handler<AsyncResult<String>>() {
public void handle(AsyncResult<String> result) {
// If the verticle was successfully deployed
if (result.succeeded()) {
// Get the deployment ID
String deploymentID = result.result();
// Undeploy the verticle using the deployment ID
container.undeployVerticle(deploymentID);
}
}
});Maybe Via can give you some ideas for alternatives in general. The development version (0.3.0) is a fault tolerant implementation that's not stable and may be pretty complicated, but 0.1.0 is pretty simple and a good example of deployment management.
Jordan Halterman
I also implemented basic auto-redeployment of modules in my application, but based on file change detection.
More specifically, I wrote a verticle that "listens" for file changes (add/modify/delete) in specified directories, based on the java 7 nio package.
When such a file change is detected, it is send to a specific address on the eventbus.
The main module that deploys all other modules in my applicaiton registers a handler on that address and reacts to those events by deploying, redeploying or undeploying the related modules.
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
I understand your concern, but I only do this for my own custom modules and I know I shouldn't do anything fancy in there that can cause issues with the rest of the application ;-)
Regarding the deployment id's, I keep them in a map and remove/update them when un/re-deploying a module.