@Modified void modified(ComponentContext compContext) throws Exception {
  logger.debug("Reconfiguring the JDBC Repository Service with configuration {}",compContext.getProperties());
  try {
    JsonValue newConfig=enhancedConfig.getConfigurationAsJson(compContext);
    if (hasConfigChanged(config,newConfig)) {
      DataSourceService oldDataSourceService=configuredDataSourceService.getAndSet(initDataSourceService(newConfig,compContext.getBundleContext()));
      oldDataSourceService.shutdown();
      logger.info("Reconfigured the JDBC Repository Service {}",compContext.getProperties());
    }
  }
 catch (  Exception ex) {
    logger.warn("Configuration invalid, can not reconfigure the JDBC Repository Service.",ex);
    throw ex;
  }
}

@ Modified void modified ( ComponentContext compContext ) throws Exception { logger . debug ( "Reconfiguring the JDBC Repository Service with configuration {}" , compContext . getProperties ( ) ) ; try { JsonValue newConfig = enhancedConfig . getConfigurationAsJson ( compContext ) ; if ( hasConfigChanged ( config , newConfig ) ) { DataSourceService oldDataSourceService = configuredDataSourceService . getAndSet ( initDataSourceService ( newConfig , compContext . getBundleContext ( ) ) ) ; oldDataSourceService . shutdown ( ) ; logger . info ( "Reconfigured the JDBC Repository Service {}" , compContext . getProperties ( ) ) ; } } catch ( Exception ex ) { logger . warn ( "Configuration invalid, can not reconfigure the JDBC Repository Service." , ex ) ; throw ex ; } }
handles configuration updates without interrupting the service
