This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
CNI from apache module
- From: Lars Andersen <lars at jatak dot com>
- To: java at gcc dot gnu dot org
- Date: Mon, 18 Feb 2002 11:28:00 +0100
- Subject: CNI from apache module
The news section mentions that it is possible to interface an apache module to java thru CNI (I guess?).
I have tried the same thing :
In the module initializer I initiate the VM :
JvCreateJavaVM (NULL);
And in the request handler the java-code is called
JvAttachCurrentThread (NULL, NULL);
< CNI calls >
JvDetachCurrentThread ();
Everything compiles and links nicely, but apache crashes upon initializing the Java VM.
The same code works when linked as a stand-alone app.
I suspect JvCreateJavaVM (NULL); should be placed somewhere else, in the apache server startup perhaps?
Regards
Lars Andersen