Description
JCC has the option to build module in a shared mode. However JArray....objects are never shared
This works when using only lucene, but fails when the other module is linked against lucene
- create array of string objects
x = j.JArray_object(5)
for i in range(5):
x[i] = j.JArray_string(['x', 'z'])
In [7]: for i in range(5):
x[i] = j.JArray_string(['x', 'z'])
...:
...:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/dvt/workspace/montysolr/src/python/<ipython console> in <module>()
TypeError: JArray<string>[u'x', u'z']
The JArray functions/objects are different:
In [9]: id(lucene.JArray_string)
Out[9]: 140313957671376
In [10]: id(solr_java.JArray_string)
Out[10]: 140313919877648
In [11]: id(montysolr_java.JArray_string)
Out[11]: 140313909254704
In [12]: id(j.JArray_string)
Out[12]: 140313909254704
Other objects are shared:
In [18]: id(lucene.Weight)
Out[18]: 140313957203040
In [19]: id(solr_java.Weight)
Out[19]: 140313957203040
In [20]: id(j.Weight)
Out[20]: 140313957203040
The module 'j' is built with:
-m jcc --shared --import lucene --import solr_java --package
org.apache.solr.request --classpath ... --include
../build/jar/montysolr_java-0.1.jar --python montysolr_java --build
--bdist