yes, it is true that "jni_tester" will only be loaded once. Your code that uses Bridge only has to be in the \lib directory if Bridge uses any of those classes. If your other code is just calling Bridge, it can go into the web-inf/lib for your context.
Charlie > -----Original Message----- > From: Jhair Tocancipa Triana [mailto:[EMAIL PROTECTED]] > Sent: Friday, July 12, 2002 4:49 AM > To: [EMAIL PROTECTED] > Subject: JNI and Tomcat Classloaders > > > Hi, > > I do have the following problem. Suppose the following class: > > class Bridge{ > /* ... */ > static{ > System.loadLibrary( "jni_tester" ); > } > /* ... */ > } > > It is possible to create/destroy instances of Bridge inside Tomcat in > such a way that the shared library jni_tester is loaded only once? > > The shared library and the code which uses Bridge reside in > $CATALINA_HOME/lib, so this code should be loaded by the shared class > loader[1]. > > Hence jni_tester will be loaded by the shared class loader only once. > Is that true? Or should I do something else to make the native code > to be loaded only once? (I store state information in the native code) > > Thanks in advance for your help, > > -- > --Jhair > > [1] http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>