Skip to content

Instantly share code, notes, and snippets.

@pas256
Created April 2, 2013 23:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pas256/5297243 to your computer and use it in GitHub Desktop.
Save pas256/5297243 to your computer and use it in GitHub Desktop.
Response
garethbowles1
1:55 spoon16, here's the answer from allenxwang:
1:55 You need to use JDBCConfigurationSource together with DynamicConfiguration, where it can poll the configuration source at some interval. Then add DynamicConfiguration to ConfigurationManager:
1:55 DynamicConfiguration dynamicConfig = ... // create config with JDBCConfigurationSource
1:55 (AggregatedConfiguration) config = (AggregatedConfiguration) ConfigurationManager.getConfigInstance();
1:55 config.addConfiguration(dynamicConfig, "Database");
1:55 Then the fast property will get callback once the value is changed in the database.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment