tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cost...@covalent.net
Subject Re: M1 ?
Date Mon, 03 Jun 2002 14:34:42 GMT
On Mon, 3 Jun 2002, jean-frederic clere wrote:

> > BTW, I'll need more informations on how to use 
> > JNI use stuff in apache 1.3 and 2.0.
> > 
> > We'll have also to comment the fact that at least
> > under Linux there is need to update by hand LD_LIBRARY_PATH
> > to have jni shared libs loaded ....

We can add it in the tomcat.sh script. It's a bit tricky since the PATH 
depends on VM, but we can include more ( JAVA_HOME/jre/lib/`arch`/classic,
... ) to be sure.

Note that JNI doesn't work with 1.3 ( or it doesn't make sense, even
if it works ) - 1.3 is single threaded. 

I also expect JNI to be more used for out-of-process connections and
operations ( unix socket, signals, chuid, shmem ), from the java process.
In this case you only need libapr.so and libjkjni.so in the 
LD_LIBRARY_PATH ( i.e. easier to put in the script ).

Regarding 'how to use' - I'll write some more docs. Workers2.properties
is where you have to configure it.  

Also - I don't consider JNI worker one of the 'supported' features, there
are still many things to tests and is too tricky. I think the socket
remains the 'default' and what we should support for most users.


> Will it work to load them before? I am thinking of adding some dlopen in the 
> jakarta-commons-sandbox/daemon to load native libraries. (jsvc is what I use to 
> start the TC).

I don't know. Depends on Java, that's where things go bad. In theory you 
shouldn't need to set LD_LIBRARY_PATH, but it's extremely unconsistent.

If you find that adding dlopen solves the problem for jni worker, it would 
be better to add it to jk_vm.c - since tomcat is started by the apache
process, you can't start it with jsvc ( or I don't know how you would
do it ). 

If you want to use the libjkjni without setting LD_LIBRARY_PATH, you could
also do it in the jk_jni code ( for example a small loader function ). You 
can already specify the full path to libjkjni.so, and if libapr.so is
installed in the same dir it'll work. 

Costin




--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message