开发者

Is there a way to prevent Tomcat from crashing when a loaded JNI library corrupts memory?

开发者 https://www.devze.com 2023-03-10 10:01 出处:网络
We have a web application running on Tomcat 7 and it loads a JNI library module that was coded in C++ and which was developped by a third party. Basically, this library provides biometric technology t

We have a web application running on Tomcat 7 and it loads a JNI library module that was coded in C++ and which was developped by a third party. Basically, this library provides biometric technology to our web app. We cannot use an all java solution for this and have no other choice than to use that JNI library module.

The problem is that sometimes, the JNI library module crashes because it does a segmentation fault and corrupts memory. When that happens, it makes Tomcat crash completely without warning.

Is there a way to prevent tomcat from completely crashing when a loaded JNI library module crashes? Ideally, when the JNI library module crashes, we would like to be notified and have a chance to reload the web app/module. Is that pos开发者_运维问答sible?

Thanks for the help.


You can start another JVM which loads the JNI library. When the JVM dies, you can restart start it from your Tomcat.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号