I have a Java server application that handles low level network data processing running on a Linux kernel. I also have two restrictions:
- Native code for data processing
- Hitless upgrade of the Java application (no loss of data)
The solution I came up with is to have a separate native process for the network data and control it from the Java server through some kind of IPC, like Named Pipes. I am now looking for the best option to start this process in the first place.
I could compile it as a native executable code and run it as an external process Runtime.exec()
, however, I'm not sure that the process will keep running if the JVM is killed and that is what I need.
Is there a way to have the native code compiled as a shared object, accessible through JNI and start the process from Java or from native context in a posix thread or something and have it still running when Java is killed?
Thanks!