On Fri, 13 Mar 2009, Christian Heimes wrote:
Bill Janssen wrote:
I was thinking about this some more, and have an idea. How about only
having the dictionary of the module init'ed by calling initVM? That is,
it would be practically speaking impossible to call any other Java
method until the VM has been initialized and the thread attached. The
overhead would go into "import", where it might be acceptable. So
instead of getting the bus error, you'd get an AttributeError.
It's possible to have multiple packages that are warpped with JCC. You
have to invoke initVM exactly once with the combined class path of every
package. You have to add a way to tell a package that it has been
initialized by initVM() of another package.
This is where shared mode comes in. The initVM() call is then implemented by
the libjcc.so shared library and all global state it controls, such as the
VM pointer, is shared among all JCC-built extensions in the process.
Andi..