On Thu, 2023-01-05 at 09:47 +0000, [email protected] wrote:
> So, this sounds like an XY problem.  You haven’t described why it’s
> necessary to change Jena initialisation (which is generally a bad
> idea), presumably it causes you some problem, but without knowing
> what that problem is we can’t give you an answer on whether this is
> the right solution
> 
> If you really want to change anything ServiceLoader based (not just
> Jena) then the way to do that is to re-pack the JARs, e.g., with
> Maven Shade plugin, filtering out the META-INF services files you
> don’t want and inserting your own hand-crafted one(s).

Let me describe one concrete example in more detail; for a command line
tool that is supposed to be quick to run, can and should pick up jena-
geosparql from the classpath in order to provide geo functionality.
However if the user already knows that they won't need it, they should
be able to skip it with a command line flag thus saving precious
startup time. Messing with shading and manually crafting service files
does not seem like the best way to me.

> 
> Rob
> 
> From: Simon Bin <[email protected]>
> Date: Wednesday, 4 January 2023 at 19:37
> To: [email protected] <[email protected]>
> Subject: Re: Re: Question concerning Subsystem Registry
> On Wed, 2023-01-04 at 15:59 +0000, Andy Seaborne wrote:
> > What are you trying to change?
> 
> Currently I want to stop some JenaSubsystemLifecycles from loading
> and
> run some alternate action even if they are present in a META-INF
> services file, for example if they are on the class path. The old
> docs
> sound like they would have allowed me to do so.
> 
> Thanks,
> 
> > 
> >      Andy
> > 
> > On 04/01/2023 13:08, Simon Bin wrote:
> > > Hi,
> > > 
> > > I'm trying to change the Subsystem Registry in order to have  a
> > > better
> > > control about JenaSystem.init, I found this page ==>
> > > https://jena.apache.org/documentation/notes/system-initialization.html
> > > 
> > > However I cannot follow it, as there is no
> > > JenaSystem.setSubsystemRegistry.
> > > 
> > > Any ideas?
> > 

Reply via email to