Index: core-module/src/main/java/egovframework/com/ext/jstree/support/util/CustomBootstrapCacheLoader.java =================================================================== diff -u -N --- core-module/src/main/java/egovframework/com/ext/jstree/support/util/CustomBootstrapCacheLoader.java (revision 0) +++ core-module/src/main/java/egovframework/com/ext/jstree/support/util/CustomBootstrapCacheLoader.java (revision 0346245cce2a0bf09efd6117f44548b9be6b0943) @@ -0,0 +1,44 @@ +package egovframework.com.ext.jstree.support.util; + +import net.sf.ehcache.CacheException; +import net.sf.ehcache.Ehcache; +import net.sf.ehcache.Element; +import net.sf.ehcache.bootstrap.BootstrapCacheLoader; + +import java.util.List; + +public class CustomBootstrapCacheLoader implements BootstrapCacheLoader { + + boolean asynchronous; + + @Override + public void load(Ehcache cache) throws CacheException { + List keys = cache.getKeys(); + + if ((keys == null) || keys.isEmpty()) + { + return; + } + + for (Object key : keys) + { + Element el = cache.getQuiet(key); + cache.removeQuiet(key); + cache.putQuiet(el); + } + } + + @Override + public Object clone() throws CloneNotSupportedException { + return super.clone(); + } + + @Override + public boolean isAsynchronous() { + return asynchronous; + } + + public void setAsynchronous(boolean asynchronous) { + this.asynchronous = asynchronous; + } +} Index: core-module/src/main/java/egovframework/com/ext/jstree/support/util/CustomBootstrapCacheLoaderFactory.java =================================================================== diff -u -N --- core-module/src/main/java/egovframework/com/ext/jstree/support/util/CustomBootstrapCacheLoaderFactory.java (revision 0) +++ core-module/src/main/java/egovframework/com/ext/jstree/support/util/CustomBootstrapCacheLoaderFactory.java (revision 0346245cce2a0bf09efd6117f44548b9be6b0943) @@ -0,0 +1,30 @@ +package egovframework.com.ext.jstree.support.util; + +import java.util.Properties; + +import net.sf.ehcache.bootstrap.BootstrapCacheLoader; +import net.sf.ehcache.bootstrap.BootstrapCacheLoaderFactory; + +public class CustomBootstrapCacheLoaderFactory extends BootstrapCacheLoaderFactory { + + private final String ASYNCHRONOUS_PROPERTY_KEY = "ASYNCHRONOUS"; + + public CustomBootstrapCacheLoaderFactory() { + super(); + // TODO Auto-generated constructor stub + } + + @Override + public BootstrapCacheLoader createBootstrapCacheLoader(Properties properties) { + CustomBootstrapCacheLoader loader = new CustomBootstrapCacheLoader(); + loader.setAsynchronous(getAsyncFromProperty(properties)); + + return loader; + } + + private boolean getAsyncFromProperty(Properties properties) { + String asynchronous = properties.getProperty(ASYNCHRONOUS_PROPERTY_KEY); + + return Boolean.valueOf(asynchronous); + } +} Index: core-module/src/main/resources/customEhcache.xml =================================================================== diff -u -N -r73fd23eac3dba9dfcf88b9198f0efd7a13f7a285 -r0346245cce2a0bf09efd6117f44548b9be6b0943 --- core-module/src/main/resources/customEhcache.xml (.../customEhcache.xml) (revision 73fd23eac3dba9dfcf88b9198f0efd7a13f7a285) +++ core-module/src/main/resources/customEhcache.xml (.../customEhcache.xml) (revision 0346245cce2a0bf09efd6117f44548b9be6b0943) @@ -6,13 +6,12 @@ + \ No newline at end of file