You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Andreas Schaefer <sc...@me.com.INVALID> on 2019/06/06 19:44:11 UTC

Sling Runmodes Configuration to Feature Model issues

Hi

I having issues with getting Sling up and running with a PM to FM conversion.

The Segment Node Store configuration in Sling PM:

[configurations runModes=oak_tar]
  org.apache.jackrabbit.oak.segment.SegmentNodeStoreService
    name="Default\ NodeStore”

This is what the converted FM looks like:

"org.apache.jackrabbit.oak.segment.SegmentNodeStoreService.runmodes.oak_tar":{
  "name":"Default NodeStore"
},

When I start Sling with the Feature Launcher it will create a configuration with the name org.apache.jackrabbit.oak.segment.SegmentNodeStoreService.runmodes.oak_tar instead of only start it in run mode oak_tar.

When I change the name of the configuration to org.apache.jackrabbit.oak.segment.SegmentNodeStoreService sling starts up just fine.

Questions:

1. Are multiple run mode configurations supported in FM or should a FM be configured for a particular run mode?

2. If multiple configurations are supported how are the unwanted configurations ignored as the run mode by default is not set in the FM model

- Andy

Re: Sling Runmodes Configuration to Feature Model issues

Posted by Carsten Ziegeler <cz...@apache.org>.
Hi Andreas,


run modes are not supported by a feature. The idea is that you create 
different features or override configuration values at launch time.

Depending on the use case you can solve the problem in different ways. 
For example (if you have two run modes):

- create two distinct features

- create a single feature and then two features using that base feature 
as a prototype

- create a feature that is for the "default" run mode, create a second 
feature using the first as a prototype for the other run mode

- create a single feature and override configurations on startup

And there are potentially more solutions

Regards

Carsten


Andreas Schaefer wrote
> Hi
> 
> I having issues with getting Sling up and running with a PM to FM conversion.
> 
> The Segment Node Store configuration in Sling PM:
> 
> [configurations runModes=oak_tar]
>    org.apache.jackrabbit.oak.segment.SegmentNodeStoreService
>      name="Default\ NodeStore”
> 
> This is what the converted FM looks like:
> 
> "org.apache.jackrabbit.oak.segment.SegmentNodeStoreService.runmodes.oak_tar":{
>    "name":"Default NodeStore"
> },
> 
> When I start Sling with the Feature Launcher it will create a configuration with the name org.apache.jackrabbit.oak.segment.SegmentNodeStoreService.runmodes.oak_tar instead of only start it in run mode oak_tar.
> 
> When I change the name of the configuration to org.apache.jackrabbit.oak.segment.SegmentNodeStoreService sling starts up just fine.
> 
> Questions:
> 
> 1. Are multiple run mode configurations supported in FM or should a FM be configured for a particular run mode?
> 
> 2. If multiple configurations are supported how are the unwanted configurations ignored as the run mode by default is not set in the FM model
> 
> - Andy
> 
--
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org