如何在不停止 Java EE 服务器的情况下更新应用程序?
我有一个在 JBoss 服务器上运行的应用程序。我们需要不时更新应用程序。 但是,由于业务原因,JBoss 不允许在更新期间停止(重新启动)。我该如何处理这种棘手的情况?谢谢!
2种情况:
- 如果应用程序部署在 集群模式下的多服务器。
- 如果应用程序部署在 单机。
I have an application running on a JBoss server. We need update the application time to time.
However, the JBoss is not allowed stop(restart) during update for business reason. How do I handle this tricky situation? Thanks!
2 cases:
- If the application is deployed in
multi servers in cluster mode. - If the application is deployed in a
single machine.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您暂时无法停止应用程序,那么您可能需要:
原则上,上述每一项都是可能的,但应用程序的具体情况可能会带来严重的障碍。
许多组织只是简单地认为服务可能会出现小幅中断,例如周日早上 2:00。他们警告用户“系统崩溃”,然后停止旧版本并启动新版本。这比提供 100% 的正常运行时间简单得多。
这种方法的一个技巧是,可以部署应用程序的新版本但不激活它(我知道可以在 WebSphere 中完成,不知道 JBOSS)。当应用程序需要几分钟的时间来部署和启动时,这可以缩短停机时间。
If you can't stop the application even for a moment then you probably need to:
Each of the above is, in principle, possible but specifics of the applcations can present serious obstacles.
Many organisations simply take the view that there can be a small hiatus in service, for example at 2:00 AM on a Sunday morning. They warn users "system going down", then stop the old version and start the new. This is much simpler than providing 100% up-time.
One trick with this approach is that it may be possible (I know it can be done in WebSphere, don't know about JBOSS) to deply the new version of the app but not activate it. When an app takes several minutes to deploy and start this can shorten the down time.
这是一个常见问题,Web 应用程序无法在运行时真正“更新”(除非它是热部署环境)。也许您想要类似 LiveRebel 的东西?
现场叛逆者
It's a common problem, and web apps can't really "updated" at runtime (unless it's a hotdeploy environment). Perhaps you want something like LiveRebel?
LiveRebel