We're using the Lindo API (math optimizer) as a shared/lib jar in Tomcat 5.0.28 under RedHat (2.6.9-5). The jar itself is a JNI wrapper for the engine.
It works fine, for a time. Intermittently, and at fairly random intervals, attempts to reference classes from that jar throw an ERROR "no lindojni in java.library.path". No exception is generated, even with X:checkjni enabled. It just sort of stops answering the phone. It may run without problems for a week, then die. Maybe next time its a day.
We have to use some JNI stuff where I work and we've seen flaky behavior if we try to either do a hot deploy or if we stop and start and individual application without a clean restart of Tomcat (and thus the entire JVM).
We always do a full Tomcat restart for other reasons related mostly to some poor initial design choices. We do hot swaps of JSPs, but that's it.
That being said, there was a script that would restart tomcat via shutdown/startup, but didn't wait for the shutdown to finish. When we tried using this script, we got the same behavior from the JNI library.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com