That's why I wanted to discuss the approach. I was trying to think of ways to link the contents of the Bundle Content to the instance state, Runmodes seem like a logical solution.
On further reflection this morning, I think it makes more sense to handle this with include / exclude settings in the JCR Content Loader. The idea being you could have an OSGi Config with: Seeding Setting: - Includes Path: [ "^/apps/.*", "^/libs/.*", "^/oak:index/.*" ] Runtime Setting: - Includes Path: [ "^/.*" ] - Excludes Path: [ "^/apps/.*", "^/libs/.*", "^/oak:index/.*" ] The Bundle Content Loader would then filter out the path roots based on the include / exclude rules. I would only expect this to happen at the path root, not for the individual nodes being loaded. The configuration would not be required and in that case the Bundle Content Loader would load all content. I would think this solution would work and adds the added benefit of being very backwards compatible and not requiring changes to the bundle configurations. WDYT? On Wed, Oct 21, 2020 at 5:31 AM Robert Munteanu <[email protected]> wrote: > Hi Daniel, > > On Mon, 2020-10-19 at 14:49 -0400, Daniel Klco wrote: > > Hey Sling Team, > > > > As Robert mentioned previously[1] using the JCR Content Loader with a > > Composite NodeStore is challenging as it keeps track of the status of > > the > > bundles underneath the /var directory. > > > > One of the practical challenges I've also seen with a Composite > > Repository > > is that you actually want the bundle content to re-install when the > > Composite Repository loads. For example, if you want a single bundle > > to > > populate the entire repository you may want it to load content under > > /apps > > during seeding and /conf during runtime. > > > > My proposal would be to add a new PathEntry directive, "skipRunmode" > > which > > would skip the installing of a content entry when the Sling instance > > is > > running with the specified runmode. If not specified the content > > would > > still be loaded so this would be backward compatible. > > Without looking at the code - why have you tried linking this to > runmodes? We are trying to move away from that and with the feature > model you can have different configurations per feature ( or aggregate > ). > > Thanks, > Robert > >
