Has anyone tried to call a jni method in a servlet and if yes:
what infrastructure are you using (web server, servlet engine ..) and
what experience did you make?
I've used both Tomcat and Lotus Domino to run servlets which access
native methods. Both work, but you have to be careful of the
security environment. Access to native methods are usually tightly
control because then you have full access to the underlying OS and
hardware and in the wrong hands that can be a bad thing, from crashes
to actual destructive behavior (whether inadvertant or not).
In general I would suggest staying away for native methods used as
part of a particular servlet unless you absolutely have to. And if
you do, isolate the methods in a package that is installed as part
of the JVM core classes.
JNI is a powerful tool, and in the right situations, extremely
useful, but it should only be used with a very good understanding of
the issues involved.
--Joe