JENA-1524, PR#401, from christopher-johnson who is working on TrellisLDP with Java9 modules.

It addresses a split package, org.apache.jena.system, between jena-arq and jena-core. Java9 modules does not allow split packages.

I'm just finishing up this PR and merging it into the codebase; it has a wider impact so here is a heads-up on that.

To clear the package split, PR#401 renames the jena-core package org.apache.jena.sys, and puts an adapter class for the JenaSystem (used for .init()) into jena-arq/org.apache.jena.system.

This is less disruptive because Txn is in jena-arq/org.apache.jena.system.

It does however, have a knock on effect because the service loader initialization files are org.apache.jena.system.JenaSubsystemLifecycle.

Renaming these to org.apache.jena.sys.JenaSubsystemLifecycle will impact any Jena applications that hook into Jena initialization. There are going to be less of these than using Txn so it seems less disruptive this way round.

I haven't thought of a way to smooth the transition. Adapters seem to end up duplicating the init process looking for both names which is instant technical debt.

Moving init into jena-arq and having jena-core be special carries a risk because the jena-core/jena-arq init is quite sensitive to the wonders of Java class initialization and ordering (that is, how to have undefined final statics!). It does work in the test suite but that is hardly representative because apps do first use Jena in weird and an unexpected ways.

The most exposed part of the service loader is repacking Jena jars. This will not be affected if following the instructions in jena-repack[1] which is necessary for any service loader files (there are others that Jena picks up).

    Andy

[1] https://jena.apache.org/documentation/notes/jena-repack.html

Reply via email to