如何在不停止 Java EE 服务器的情况下更新应用程序?

发布于 2024-09-15 23:37:21 字数 176 浏览 5 评论 0原文

我有一个在 JBoss 服务器上运行的应用程序。我们需要不时更新应用程序。 但是,由于业务原因,JBoss 不允许在更新期间停止(重新启动)。我该如何处理这种棘手的情况?谢谢!

2种情况:

  1. 如果应用程序部署在 集群模式下的多服务器。
  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:

  1. If the application is deployed in
    multi servers in cluster mode.
  2. If the application is deployed in a
    single machine.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

狼亦尘 2024-09-22 23:37:21

如果您暂时无法停止应用程序,那么您可能需要:

  1. 同时运行两个版本。
  2. 将新用户定向到新版本并允许现有用户会话继续针对旧版本
  3. 以便能够检测到旧版本不再使用并因此可以停止。

原则上,上述每一项都是可能的,但应用程序的具体情况可能会带来严重的障碍。

许多组织只是简单地认为服务可能会出现小幅中断,例如周日早上 2:00。他们警告用户“系统崩溃”,然后停止旧版本并启动新版本。这比提供 100% 的正常运行时间简单得多。

这种方法的一个技巧是,可以部署应用程序的新版本但不激活它(我知道可以在 WebSphere 中完成,不知道 JBOSS)。当应用程序需要几分钟的时间来部署和启动时,这可以缩短停机时间。

If you can't stop the application even for a moment then you probably need to:

  1. To run both versions at the same time.
  2. Direct new users to the new version and allow existing user sessions to continue against the old version
  3. To be able to detect that the old version is no longer in use and hence can be stopped.

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.

ヅ她的身影、若隐若现 2024-09-22 23:37:21

这是一个常见问题,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

Would you like to update your
application in production with zero
downtime? Avoid the tedious and
error-prone application update
roll-outs? Roll back unsuccessful
updates with a press of a button? Then
sign up to receive an invitation as
soon as it’s available.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文