简体   繁体   English

使用JBoss 5.1以编程方式重新部署的问题

[英]Problem to make redeploy programmatically using JBoss 5.1

I have a problem to make redeploy programmatically using JBoss 5.1. 我在使用JBoss 5.1进行编程重新部署时遇到问题。 After starting JBoss the follow code works well. 启动JBoss之后,以下代码可以正常运行。 But after the first time that it execute always the program freeze at line with "problem here", without throwing any exception, and showing a message that was done undeploy from "project.sar" and nothing more. 但是,在第一次执行该程序后,程序始终会冻结在“问题在这里”的行中,而不会引发任何异常,并显示一条从“ project.sar”取消部署的消息,仅此而已。

Context ctx = new InitialContext();
ProfileService profile = (ProfileService) ctx.lookup("ProfileService");
DeploymentManager dm = profile.getDeploymentManager();

DeploymentProgress redeploy;

{
    try {
        System.out.println("Redeploy: "+dm.isRedeploySupported()); // show always true
        redeploy = dm.redeploy("project.sar");
        redeploy.run(); // problem here
        checkProgress(redeploy);
    }
    catch(Exception e){
        ...
    }
}

ctx.close();
dm.releaseProfile();

Any idea about what's happening? 对发生的事情有任何想法吗? Is this a bug from the version 5.1? 这是5.1版的错误吗?

Thanks in advance 提前致谢

My conclusion is that problem is a bug from the version 5.1. 我的结论是,问题出在5.1版中。 I found others problems like this, such as this . 我发现其他问题,像这样的,比如这个

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM