On 03/01/2023 13:43, Andy Seaborne wrote:
On 03/01/2023 11:40, LB wrote:
Hi all and late happy new year!
Nice work with the modules Andy.
Now, a probably a silly question and maybe I missed something already
mentioned in some other mail ...
Documentation:
"Modules are invoked during the process of building a Fuseki Main server."
I tried to add a Fuseki Module, but for the Fuseki with UI Standalone
setup. It looks like my module does only work for setups based on
Fuseki Main, is this correct? When using Fuseki Standalone, I can see
from logs that FusekiModule::start is called,
How? Because FusekiModule is in jena-fuseki-main.
(Your fuseki module may have too much Fuseki in it - you have to exclude
all of Fuseki from a module jar if it is shaded.)
Having to produce a jar file without the Fuseki in it, despite compiling
code for Fuseki interfaces, is a bit of a burden when using FusekiMain
in Java code.
FusekiModule conflates configuration during the build lifecycle and
loading code using ServiceLoader.
The orignal idea was for drop-in extensions but the configuration during
the build lifecycle is useful in it's own right.
https://github.com/apache/jena/pull/1898
proposes some changes:
* FusekiModule becomes just the interface to server building.
* A new FusekiAutoModule combines FusekiModule with SubsystemLifecycle
(the loading support)
* FusekiModule class - an immutable collection of FusekiModule (and
FusekiAutoModule)
* FusekiServer.Builder can be given a FusekiModule object.
If none is given, then one based on all the FusekiAutoModule is
created. Also, for the system wide FusekiAutoModule, a fresh
object is created for each server build so the object can
hold per-build state.
The downside is that the ServiceLoader file in /META/services/
org.apache.jena.fuseki.main.sys.FusekiModule
changes name to
org.apache.jena.fuseki.main.sys.FusekiAutoModule
FusekiModule is still labelled "experimental".
The suggestion is getting the naming right long-term is more important
than complete compatibility.
If anyone is using Fuseki module, please add your experiences so we can
confidently remove the "experimental" tag.
Andy