|
From: Glen <gle...@mo...> - 2005-03-12 14:53:01
|
What features would be lost if wrapper.exe ran the jvm in the same process (via JNI)? From looking at the code the wrapper starts the JVM (in a separate process) then connects to it over a socket to make sure it is still "living and breathing". The JVM churns away at it's task and the wrapper has the wrappereventloop.c stuff run every tenth of a second. If running in the same process the wrapper event loop could run in a separate (non-java) thread. My question is if the JVM crashes (IBM jvm's lock up,SUN's jvm crashes hard) would they kill the wrapper event loop thread? Fairly sure on the IBM jvm it wouldn't. Need to see what would happen on the SUN jvm. To save everyone from the obvious I totally agree having wrapper and run in separate processes is the most reliable and for mission critical stuff I will always do that. There are use cases for the same process. My need is I have several servers that can have up to 30 wrappers running ( = 60 processes). 3 of which are mission critical the rest are "background" batch tasks that can be easily restarted and pick up where they left off (which is exactly what we do under load). Some more thoughts on this. I think crash detection is likely not to work reliably. I can think of page faults as an example where the whole process would get killed. Conversely many features would work fine restarts from within jvm app, ctrl-c and ctrl-break trapping, anchor file restarts, cross platform scripting, jvm deadlock. Anyways looking forward to hearing people's thoughts... |