Apache module for GCJ

Hannes Wallnoefer hannes@helma.at
Mon Mar 15 22:04:00 GMT 2004


Hi there,

I did a little experiment last week to embed the GCJ runtime from an 
apache module and was surprised to find out how easy that is. The code 
doesn't do anything useful, but it creating and accessing the JVM seems 
to work well with my setup (SuSE 9.0 standard packages for Apache2 and 
GCC). You can find it here here:

http://www.apache.org/~hannes/mod_gcj/

This test encouraged me to start a mod_gcj project at sourceforge (I 
registered the project, it's now being reviewed by the sourceforge 
folks). I'd like to first create an "Apache-native" API that lets people 
implement Apache hooks in Java and maps the basic data structures to 
Java, and then in a second step try to implement a useful Servlet API 
implementation on top of it.

Basically I'm looking for all kinds of feedback and help. It would be 
interesting to hear if the code runs for other people. I'm also looking 
for contributors. I'm a Java developer and haven't done much C/C++ in 
recent years, so some help from that side would be highly welcome.

I also found this message on the mailing list archive:

http://gcc.gnu.org/ml/java/2002-02/msg00188.html

I think that code might be useful to get started. Somehow the problems 
with Apache prefork mode and  seem to have been solved in the meantime. 
I was able to throw lots of parallel requests at the module with just 
one JavaVM initialized running in prefork mode. Also, garbage collection 
seems to work ok, at least httpd footprint didn't grow in a notable way 
after running a few hundred thousand requests. But maybe that's a 
misconception and there's some fundamental mistake with this approach 
that I haven't figured out yet ;-)

Let me know what you think/find out.

hannes



More information about the Java mailing list