Web 应用程序在 jni 崩溃时重新启动?
我正在 glassfish 编写一个 Java EE Web 应用程序。
我担心 jni 崩溃时会发生什么。
- 服务器会崩溃吗? - 这在 Linux 环境中是可能的,因为用户可以篡改某些文件,这会导致 jni 崩溃。
如果可以在崩溃时自动重新启动,那就太好了,但我找不到如何做到这一点。
I am writing a web application Java EE at glassfish.
I worry what would happen at a jni crash.
- Would the server crash? - this is possible in Linux environment as users can tamper with some files and that would lead to jni crash.
If it is possible to automatically restart on crash it would be great but I cant find how to do this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
运行 Glassfish 的 JVM 会崩溃。主机服务器不会崩溃。
仅当您搞乱了相关文件的访问权限时...或者您将 root / sudo 访问权限授予了错误的人。
通常,您可以通过从脚本启动 JVM 来执行此操作,该脚本检测到服务已终止并在循环中重新启动它。 (处理锁定/停止工作而不真正死亡的服务更加棘手......)
The JVM that is running Glassfish would crash. The host server would not crash.
Only if you've messed up the access permissions on the relevant files ... or you've granted root / sudo access to the wrong people.
You normally do this by launching the JVM from a script that detects that the service has dies and restarts it in a loop. (Dealing with a service that locks up / stops working without actually dying is more tricky ...)