Hi Patrick, > If I recall correctly, if you let the mod_perl code (re)start the JVM > as needed, you will get problems shutting down Apache cleanly because the > Java process > ends up being a descendant of Apache and Apache seems to be waiting for it to > die > before shutting down.
The behavior I am seeing is that if you start the JVM from the parent process, e.g. in a startup or preload script, the Apache children shutdown cleanly. If you start the JVM in a child process, then the children don't shutdown cleanly and have to be sent a SIGKILL to shutdown - which Apache does itself. In either scenario the JVM keeps running after the Apache parent process exits. I was also having some problems where if the JVM goes away (e.g. Inline::Java::Server=stop) Inline::Java calls will fail with 'Can't receive packet from JVM: at lib/i386-linux-thread-multi/Inline/Java/Protocol.pm' until the Inline::Java code is reloaded, i.e. when Apache is restarted, even if the JVM is started up again (e.g. Inline::Java::Server=start). > You could try it and see if that still happens, but I remember that > being a problem. Right now I have a pretty nice solution/workaround of use'ing the module that use's Inline::Java in a startup script, i.e. in the parent process, and registering a cleanup handler: use Inline::Java::Server (); use UFT::PlunkIT::ContactBookServiceInline (); # starts up JVM Apache->server->register_cleanup(\&Inline::Java::Server::stop); > If anyone can find the exact problem, I will try to fix Inline::Java > so it works properly under those circumstances. Can you tell me how the JVM knows that it's time to exit if it's running in SHARED_JVM? Thanks, Aaron