I had an interesting conversation today with Tom Tromey and Andrew Haley
of Red Hat about how to implement "pljava" for Postgres. Rather than
futzing with an external JVM, their thought is to use gcj (gcc compiling
Java). It sounds like this approach would mostly just work, modulo
needing to use a small amount of C++ code to call the defined APIs for
gcj.
This would not be a perfect solution: gcj isn't yet ported everywhere,
and it would probably not play nice on machines where the standard C
library isn't thread-safe. But it seems a lot more within reach than
the approaches we've discussed in the past.
I'm not volunteering to try to do this, but I wanted to toss the idea
up in the air and see if anyone wants to try it. Tom and Andrew
indicated they'd be willing to help out with advice etc for anyone
who wants to take on the project.
regards, tom lane