This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]