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.
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 …)