You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by js...@apache.org on 2023/11/02 09:35:09 UTC

(sling-site) branch docs/SLING-12107-execution-order created (now f30d2414c)

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

jsedding pushed a change to branch docs/SLING-12107-execution-order
in repository https://gitbox.apache.org/repos/asf/sling-site.git


      at f30d2414c SLING-12107 - JCR Repoinit executes operations out of order

This branch includes the following new commits:

     new f30d2414c SLING-12107 - JCR Repoinit executes operations out of order

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(sling-site) 01/01: SLING-12107 - JCR Repoinit executes operations out of order

Posted by js...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jsedding pushed a commit to branch docs/SLING-12107-execution-order
in repository https://gitbox.apache.org/repos/asf/sling-site.git

commit f30d2414cf84d225e56d8e27ae2db00c3d486c00
Author: Julian Sedding <js...@apache.org>
AuthorDate: Thu Nov 2 10:34:36 2023 +0100

    SLING-12107 - JCR Repoinit executes operations out of order
    
    - document execution order of repoinit statements
---
 .../content/documentation/bundles/repository-initialization.md      | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/main/jbake/content/documentation/bundles/repository-initialization.md b/src/main/jbake/content/documentation/bundles/repository-initialization.md
index 2b44fac43..68811bdf5 100644
--- a/src/main/jbake/content/documentation/bundles/repository-initialization.md
+++ b/src/main/jbake/content/documentation/bundles/repository-initialization.md
@@ -49,6 +49,12 @@ of the repoinit parser to a JCR repository.
 The language is mostly self-explaining, the test suite listed below in Appendix A exposes
 all language constructs and options.
 
+When a repoinit script is applied with the `org.apache.sling.jcr.repoinit` module, the execution order of the individual
+statements is slightly different from their order within the script. Namely, all statements creating namespaces are
+executed before any other statements. Next, all statements registering nodetypes or privileges are executed. And finally,
+all other statements are executed in the order they are defined. This reordering is intended to avoid issues due to
+missing namespaces, nodetypes or privileges when content is created. 
+
 ## Validating repoinit statements
 
 There are multiple means to validate the syntax of repoinit statements (only leveraging the parser, but not the actual JCR Repoinit implementation) outlined below.