Ken Williams wrote: > > On Oct 7, 2005, at 9:33 AM, Michael Peters wrote: > >> Michael Peters wrote: >> >>> So I'm looking for ideas for recovery from this (or ideas to fix it in >>> the first place). Should I wrapp all Java calls from perl in an eval and >>> then try and reconnect if I get these kind of errors? >> >> >> Since the list is silent I decided to try my approach and wrap every >> Java call in an eval that checks for "Broken Pipe" messages and then >> tries to reconnect if that occurs. > > > Is there a reason why you don't want to use JNI? Too much memory in the > process, perhaps? Otherwise that would be a good way to go, no > connection to worry about losing in the long-running process.
Well, since the mod_perl processes are already somewhat big (although not too big), memory is a consideration. But mainly it's because I don't know that much about it... For instance, this line from the Inline::Java docs: Note: Inline::Java only creates one virtual machine instance. Therefore you can't use JNI for some sections and client/server for others. The first section determines the execution mode. It seems that the mod_perl processes would load Java as a shared object, but what about cron jobs? In the application, there are several perl scripts that run outside of apache that do some additional processing on work queues, data caching, etc, that all need to use Java. Does using the JNI allow this? -- Michael Peters Developer Plus Three, LP