Hi It won’t work with reload policy: only one component can listen for config change afair.
You can create another component on the config and use this component in the other ones, that should work. Regards JB Le jeu. 6 févr. 2025 à 21:02, Steinar Bang <s...@dod.no> a écrit : > >>>>> Jean-Baptiste Onofré <j...@nanthrax.net>: > > > Hi Steinar > > By default, SCR use the componentName as configuration PID. > > However, you can pass the configurationPid to the component and so > > several components can share the same configurationPid. > > Thanks! > > So far I've tried this: > @Component(service=UserManagementService.class, immediate=true, > configurationPid="no.priv.bang.authservice.config", property= { > "excessiveFailedLoginLimit:Integer=3" } ) > public class UserManagementServiceProvider implements > UserManagementService { > > @Activate > public void activate(Map<String, Object> config) { > excessiveFailedLoginLimit = (int) > config.get("excessiveFailedLoginLimit"); > } > > and this: > @Component( service=Realm.class, immediate=true, > configurationPid="no.priv.bang.authservice.config" ) > public class AuthserviceDbRealm extends JdbcRealm { > > @Activate > public void activate(Map<String, Object> config) { > > And UserManagementService.activate() receives excessiveFailedLoginLimit > in its map, while AuthserviceDbRealm.activate() does not receive > excessiveFailedLoginLimit in its map. > > I guess I could get a value in AuthserviceDbRealm.activate by setting a > property argumenet to @Component there as well...? > > But setting the default two places does sort of defeat the purpose (I > would like to set the default in a single place and use config to > override config for both components). > >