I used the deployment manager to realize deployment/undeployment with ANT. This example code worked fine with JBoss 5 but has problems with JBoss 6:
final Context ctx = new InitialContext();
final DeploymentManager dm = (DeploymentManager) ctx.lookup("DeploymentManager");
dm.distribute("thejar", new URL("file:./testdist/hello.jar"), true).run();
dm.prepare("thejar").run();
dm.start("thejar");
dm.stop("thejar").run();
dm.remove("thejar");
In real life, the deployment progress is evaluated and deployment status is checked after every call to the deployment manager ;)
Deployment and undeployment still work as expected, but this code now leaves two non-daemon threads running. Both are threads from jboss remoting, a worker thread and an accecptor thread.
Did I miss something?
Regards,
Bernd