[pylucene-dev] two different JCC modules in same VM; initVM()?
janssen at parc.com
Fri Mar 7 11:36:10 PST 2008
> The way to properly fix this is to have a separate JCC runtime python
> extension that has all these common types. Instead of compiling the JCC
> runtime code into each module, make its own python extension and import
> these types from it.
Yes, I think that's the solution. Might want to build java.lang into
it, as well.
> This gets hairier, though, with Java classes that each module you build
> might have in common, in particular, as a dependency into the JRE.
> java.lang.Object from one is not the same as java.lang.Object from the
> other, for example, so passing their instances across extensions is not
> going to work at the moment.
Right now, I think that's OK. In my application, the PyLucene code
and the GoodStuff code are logically separate; Java instances from one
are not going to get into the other. Maybe in the longer term,
though, it would be good to think about how to do this. I dream of
stubbing Swing with JCC...
> In the meantime, just compile all your java modules into one python
> extension. This is how lucene is built. All the jars included are compiled
> together into PyLucene's lucene python module.
Yes, I'm doing this. Now, I need to make it work *with* lucene.
More information about the pylucene-dev