Revision 45736 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/JDBCServerExplorerBase.java
JDBCServerExplorerBase.java | ||
---|---|---|
183 | 183 |
|
184 | 184 |
public String getResourcesTablename(String tablename) { |
185 | 185 |
String resourceTablename = mapping.get(tablename); |
186 |
LOG.info("Resource of table "+tablename+" = "+resourceTablename); |
|
186 | 187 |
return resourceTablename; |
187 | 188 |
} |
188 | 189 |
|
... | ... | |
668 | 669 |
CachedValue<CustomResourcesConfig> cachedConfig = CACHED_CUSTOM_RESOURCES_CONFIG.get(key); |
669 | 670 |
if (cachedConfig != null) { |
670 | 671 |
CustomResourcesConfig config = cachedConfig.get(); |
672 |
LOG.info("Return custom resource from CACHE."); |
|
671 | 673 |
return config; |
672 | 674 |
} |
673 | 675 |
JDBCStoreParameters params = this.helper.createOpenStoreParameters(this.getParameters()); |
... | ... | |
818 | 820 |
JDBCStoreParameters params = this.helper.createOpenStoreParameters(this.getParameters()); |
819 | 821 |
setConfigValue(params, CONFIG_NAME_CUSTOM_RESOURCES, config.toJsonString()); |
820 | 822 |
refreshCustomResourcesConfig(); |
823 |
|
|
824 |
|
|
825 |
if (StringUtils.isNotBlank(resourcesTableName)) { |
|
826 |
try { |
|
827 |
params = this.getOpenParameters(); |
|
828 |
params.setTable(resourcesTableName); |
|
829 |
JDBCResourcesStorage resourcesStorage = new JDBCResourcesStorage( |
|
830 |
null, |
|
831 |
params, |
|
832 |
tableName, |
|
833 |
config.isResourcesReadOnly(resourcesTableName) |
|
834 |
); |
|
835 |
resourcesStorage.clearCache(); |
|
836 |
} catch (Exception ex) { |
|
837 |
LOG.debug("Can't remove local cache for table "+tableName, ex); |
|
838 |
} |
|
839 |
} |
|
840 |
|
|
841 |
|
|
821 | 842 |
} |
822 | 843 |
|
823 | 844 |
private static boolean setConfigValue(JDBCStoreParameters params, String name, String value) { |
Also available in: Unified diff