@Override public void onChange(IModifiable modifiable) { log.info("A properties files has changed. Removing all entries " + "from the cache. Resource: " + resourceStream); // Clear the whole cache as associated localized files may // be affected and may need reloading as well. clearCache(); // Inform all listeners for (IPropertiesChangeListener listener : afterReloadListeners) { try { listener.propertiesChanged(path); } catch (Exception ex) { PropertiesFactory.log.error("PropertiesReloadListener has thrown an exception: " + ex.getMessage()); } } } });
@Override public void onChange(IModifiable modifiable) { log.info("A properties files has changed. Removing all entries " + "from the cache. Resource: " + resourceStream); // Clear the whole cache as associated localized files may // be affected and may need reloading as well. clearCache(); // Inform all listeners for (IPropertiesChangeListener listener : afterReloadListeners) { try { listener.propertiesChanged(path); } catch (Exception ex) { PropertiesFactory.log.error("PropertiesReloadListener has thrown an exception: " + ex.getMessage()); } } } });
public void onChange() { log.info("A properties files has changed. Removing all entries " + "from the cache. Resource: " + resourceStream); // Clear the whole cache as associated localized files may // be affected and may need reloading as well. clearCache(); // Inform all listeners Iterator<IPropertiesChangeListener> iter = afterReloadListeners.iterator(); while (iter.hasNext()) { IPropertiesChangeListener listener = iter.next(); try { listener.propertiesChanged(path); } catch (Throwable ex) { log.error("PropertiesReloadListener has thrown an exception: " + ex.getMessage()); } } } });
public void onChange() { log.info("A properties files has changed. Removing all entries " + "from the cache. Resource: " + resourceStream); // Clear the whole cache as associated localized files may // be affected and may need reloading as well. clearCache(); // clear the localizer cache as well application.getResourceSettings().getLocalizer().clearCache(); // Inform all listeners Iterator iter = afterReloadListeners.iterator(); while (iter.hasNext()) { IPropertiesChangeListener listener = (IPropertiesChangeListener)iter.next(); try { listener.propertiesChanged(key); } catch (Throwable ex) { log.error("PropertiesReloadListener has thrown an exception: " + ex.getMessage()); } } } });