Going to pose a challenge to Java developers here - one key technical debt migrating from Saxon to SaxonHE.
Idea: Do you think we could run both in the same JVM in distinct classloaders?
This would allow us to offer a SaxonHE environment in GeoNetwork 4 and work on migrating Java Functions prior to GeoNetwork 5 environment. My hesitation is that Saxon seems to be implemented very tightly into the JVM XML Stack …
Doing a bit of research shows that this may be trouble prone, Class loading and OSGi, but some allowances have been made.
Anyone with enough experience to give this idea
(or any other approaches to consider).
Indeed, you can load 2 versions of a class/package into distinct class loaders.
I could not work out the tight coupling between Saxon and the JVM you are referring to. Hence I am not sure which kind of specific problem it will introduce.
Apart from JNI, which is not used by Saxon, I don’t know of a coupling risk that can introduce an extra difficulty.
On the other hand, I do not know how you will proceed with migration. So it is important to notice the object created in one Classloader won’t be exposed to the ones created in the other one. But this is not specific to Saxon.
Thanks @sebr72 - the reason I was cautious was the impression that Saxon is not used in isolation and ends up registered with the JDK as “the built-in” xml parser.
Reading a bit more carefully Saxon does not include its own XML parser and makes use of the one register with the JDK. That increases my chances of using Saxon and SaxonHE in isolation.
Thanks for the discussion I think this is worth an experiment