You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by gi...@apache.org on 2023/01/07 15:56:36 UTC

[jena-site] branch asf-staging updated: Staged site from system-init (6625773e947385466028a2541f37a7f768258033)

This is an automated email from the ASF dual-hosted git repository.

git-site-role pushed a commit to branch asf-staging
in repository https://gitbox.apache.org/repos/asf/jena-site.git


The following commit(s) were added to refs/heads/asf-staging by this push:
     new 6baaff194 Staged site from system-init (6625773e947385466028a2541f37a7f768258033)
6baaff194 is described below

commit 6baaff194c848b8d31e15d3ce9bf836d014d6b1a
Author: jenkins <bu...@apache.org>
AuthorDate: Sat Jan 7 15:56:31 2023 +0000

    Staged site from system-init (6625773e947385466028a2541f37a7f768258033)
---
 content/documentation/index.xml                    |  4 +--
 .../documentation/notes/system-initialization.html | 37 +++++++++++-----------
 content/index.xml                                  |  4 +--
 3 files changed, 23 insertions(+), 22 deletions(-)

diff --git a/content/documentation/index.xml b/content/documentation/index.xml
index 5622a7f1e..c8e2b1325 100644
--- a/content/documentation/index.xml
+++ b/content/documentation/index.xml
@@ -135,10 +135,10 @@ Getting Started GeoSPARQL Jena can be accessed as a library using Maven etc. fro
       
       <guid>https://jena.apache.org/documentation/notes/system-initialization.html</guid>
       <description>Jena has an initialization sequence that is used to setup components available at runtime.
-Application code is welcome to also use this mechanism. This must be done with care. During Jena initialization, there is visibility of uninitialized data.
+Application code is welcome to also use this mechanism. This must be done with care. During Jena initialization, there can be visibility of uninitialized data in class static members.
 The standard initialization sequence is
 Core -&amp;gt; RIOT -&amp;gt; ARQ -&amp;gt; TDB -&amp;gt; other (including jena text)
-The sequence from core to level 500 should be executed before application components. See below for how to control the order.</description>
+The sequence from 0 to level 500 is the Jena platform initialization.</description>
     </item>
     
     <item>
diff --git a/content/documentation/notes/system-initialization.html b/content/documentation/notes/system-initialization.html
index 6af12ef10..e7805bb67 100644
--- a/content/documentation/notes/system-initialization.html
+++ b/content/documentation/notes/system-initialization.html
@@ -185,12 +185,13 @@
 	<p>Jena has an initialization sequence that is
 used to setup components available at runtime.</p>
 <p>Application code is welcome to also use this mechanism. This
-must be done with care. During Jena initialization, there is
-visibility of uninitialized data.</p>
+must be done with care. During Jena initialization, there can be
+visibility of uninitialized data in class static members.</p>
 <p>The standard initialization sequence is<br>
 Core -&gt; RIOT -&gt; ARQ -&gt; TDB -&gt; other (including jena text)</p>
-<p>The sequence from core to level 500 should be executed before application
-components. See below for how to control the order.</p>
+<p>The sequence from 0 to level 500 is the Jena platform
+initialization. Application may use the jena initialization mechanism and it is
+recommended to place initialzation code above level 500.</p>
 <p>Initialization occurs when <code>JenaSystem.init()</code> is first called.  Jena ensures that this
 is done when the application first uses any Jena code by using class
 initializers.</p>
@@ -200,14 +201,14 @@ with <code>ServiceLoader</code> files in repacked jars.</p>
 <h2 id="initialization-code">Initialization code</h2>
 <p>Initialization code is an implementation of <code>JenaSubsystemLifecycle</code> which
 itself extends <code>SubsystemLifecycle</code>.</p>
-<p>For use in the default initialization, the class must have a zero-argument constructor</p>
-<pre><code>public interface JenaSubsystemLifecycle {
-    public void start() ;
-    public void stop() ;
-    default public int level() { return 9999 ; }
-}
-</code></pre>
-<p>The code also supply a level, indicating its place in the order of initialization.
+<p>For use in the default initialization, the class must have a zero-argument
+constructor and implement:</p>
+<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java">    <span style="color:#a2f;font-weight:bold">public</span> <span style="color:#a2f;font-weight:bold">interface</span> <span style="color:#00f">JenaSubsystemLifecycle</span> <span style="color:#666">{</span>
+        <span style="color:#a2f;font-weight:bold">public</span> <span style="color:#0b0;font-weight:bold">void</span> <span style="color:#00a000">start</span><span style="color:#666">()</span> <span style="color:#666">;</span>
+        <span style="color:#a2f;font-weight:bold">public</span> <span style="color:#0b0;font-weight:bold">void</span> <span style="color:#00a000">stop</span><span style="color:#666">()</span> <span style="color:#666">;</span>
+        <span style="color:#a2f;font-weight:bold">default</span> <span style="color:#a2f;font-weight:bold">public</span> <span style="color:#0b0;font-weight:bold">int</span> <span style="color:#00a000">level</span><span style="color:#666">()</span> <span style="color:#666">{</span> <span style="color:#a2f;font-weight:bold">return</span> 9999 <span style="color:#666">;</span> <span style="color:#666">}</span>
+    <span style="color:#666">}</span>
+</code></pre></div><p>The code should supply a level, indicating its place in the order of initialization.
 The levels used by Jena are:</p>
 <ul>
 <li>0 - reserved</li>
@@ -217,9 +218,9 @@ The levels used by Jena are:</p>
 <li>30 - ARQ</li>
 <li>40 - Text indexing</li>
 <li>40 - TDB1</li>
-<li>42 - TDB1</li>
+<li>42 - TDB2</li>
 <li>60 - Additional HTTP configuration</li>
-<li>60 - RDFPAtch</li>
+<li>60 - RDFPatch</li>
 <li>96 - SHACL</li>
 <li>96 - ShEx</li>
 <li>101 - Fuseki</li>
@@ -229,12 +230,12 @@ The levels used by Jena are:</p>
 should use level above 500.</p>
 <p>Fuseki initialization includes <a href="/documentation/fuseki2/fuseki-modules">Fuseki
 Modules</a> which uses <code>SubsystemLifecycle</code>
-for different Java interface.</p>
+with a different Java interface.</p>
 <h2 id="the-initialization-process">The Initialization Process</h2>
 <p>The process followed by <code>JenaSystem.init()</code> is to load all java <code>ServiceLoader</code>
-regsitered <code>JenaSubsystemLifecycle</code>, osrt into level order, then call <code>init</code>.
-Initialization code unit at the same level can be called in any order and the
-order may be different between runs.</p>
+regsitered <code>JenaSubsystemLifecycle</code>, sort into level order, then call <code>init</code> on
+each initialization object. Initialization code at the same level may be called
+in any order and that order may be different between runs.</p>
 <p>Only the first call of <code>JenaSystem.init()</code> causes the process to run.
 Any subsequent calls are cheap, so calling <code>JenaSystem.init()</code>
 when in doubt about the initialization state is safe.</p>
diff --git a/content/index.xml b/content/index.xml
index e857c07d9..a2a35008f 100644
--- a/content/index.xml
+++ b/content/index.xml
@@ -155,10 +155,10 @@ Getting Started GeoSPARQL Jena can be accessed as a library using Maven etc. fro
       
       <guid>https://jena.apache.org/documentation/notes/system-initialization.html</guid>
       <description>Jena has an initialization sequence that is used to setup components available at runtime.
-Application code is welcome to also use this mechanism. This must be done with care. During Jena initialization, there is visibility of uninitialized data.
+Application code is welcome to also use this mechanism. This must be done with care. During Jena initialization, there can be visibility of uninitialized data in class static members.
 The standard initialization sequence is
 Core -&amp;gt; RIOT -&amp;gt; ARQ -&amp;gt; TDB -&amp;gt; other (including jena text)
-The sequence from core to level 500 should be executed before application components. See below for how to control the order.</description>
+The sequence from 0 to level 500 is the Jena platform initialization.</description>
     </item>
     
     <item>