You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by cm...@yahoo.com on 2001/08/15 06:49:05 UTC

mod_jk + jni configuration

Hi,

I'm testing the jni fixes Mike just commited, and I need some feedback on
the JNI configuration.

Right now we have a different set of files: jni_workers.properties,
mod-jk.conf-jni, jni-server.xml. The alternate set of files was first
introduced because JNI is difficult to set up, and it was felt most users
will use tomcat in 'normal' mode for testing, etc, and jni mode to run
with apache.

However, it may be better to be consistent with the rest of the
configuration, and use the "normal" config files. workers.properties
already have the definition for the 'inprocess' worker, server.xml has the
JniModule, ApacheConfig can generate config files that are usable with
the jni worker.

So my proposal is to remove the old config files ( and fix the
documentation ), and use the "normal" configs. If you want to use JNI,
you'll have to set things up - edit server.xml and uncomment ( and set the
paths ) the Jni connector, make ApacheConfig generate the right config
( jkProtocol="jni" ), add 'inprocess' to the list of workers.

Same thing you would do for Ajp13 support ( except for ajp13 you just need
the port ).

What do you think ?

Costin



Re: mod_jk + jni configuration

Posted by cm...@yahoo.com.
On Tue, 14 Aug 2001 cmanolache@yahoo.com wrote:

> Hi,
>
> I'm testing the jni fixes Mike just commited, and I need some feedback on
> the JNI configuration.

Ok, I've got it to work - it's just fine, great.

However, the fine is fine only with JDK1.2.2. I wasn't able to get it
working with any of the 1.3 VMs - sun, blackdown, IBM. The errors are
different - with "classic" I got a symbol not found, with client or server
I get a java dump ( the one that shows all the threads and then core dumps
), for IBM I get a -1 code.

This is probably due to VM bugs, maybe my settings ( for the symbol not
found, even tough the LD_LIBRARY_PATH was set ). The JNI worker works ( if
libjava.so is ok).

The good news - it works fine with JDK1.4beta... Surprise ( at least for
me, I didn't expected that - it's just a beta ).

I'll continue to try with the other vms.

My proposal: given that JNI is so tricky and dependent on vm, etc, I think
we should make sure the fixes are merged into jakarta-tomcat-connectors,
where the development will continue ( we still have to finish ajp14 and
improve the configuration ). For the "official" release, what we have
right now is decent enough - JNI has some great benefits, but I expect it
to be used only by very advanced users ( heck, I may not be that advanced
myself, I remember I once got it to work with IBM1.3 ). Each VM has it's
tricks ( sometimes a LD_LIBRARY_PATH, or strange bugs, etc). In time we
can improve on this.

>From what Mike said ( and other people ), it seems the windows version
works fine ( and that's where it'll be easy to provide DLLs ). That covers
IIS as well. For Unix - Apache2.0 is not FCS yet, and for NES - I have a
strong feeling mod_jk will work with the same VM NES is using ( they also
use JNI - and probably have similar issues, we use just standard
invocation )


Costin