running jni in a servlet

A

Astrid Wagner

Hi,

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?

Thanks.

Astrid
 
J

Joseph Millar

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top