Merge branch 'develop' into remoting-4.0
[taxeditor.git] / eu.etaxonomy.taxeditor.cdmlib / src / main / java / eu / etaxonomy / taxeditor / remoting / cache / CdmRemoteCacheManager.java
index 38612cc9152f0f5db790597c6fda8889155a0ede..84f88c24fb3c51a19b1d4d70bb0e12aa271b2f2e 100644 (file)
@@ -59,8 +59,7 @@ public class CdmRemoteCacheManager {
             cdmlibModelCache = new Cache(modelcc);
 
             CacheManager.create().addCache(cdmlibModelCache);
-
-            initCache(cdmlibModelCache);
+            initCdmModelCache(cdmlibModelCache);
 
         } catch (CacheException e) {
             throw new CdmClientCacheException(e);
@@ -68,7 +67,7 @@ public class CdmRemoteCacheManager {
 
     }
 
-    private void initCache(final Cache cache) {
+    private void initCdmModelCache(final Cache cache) {
 
         initThread = new Thread() {
             @Override
@@ -87,6 +86,9 @@ public class CdmRemoteCacheManager {
     }
 
     public Cache getCdmModelGetMethodsCache(){
+        //Note : Even though we synchronize this method, the cache can be simply
+        //       retrieved using CacheManager.create().getCache(CDM_MODEL_CACHE_NAME)
+        //       in which case the cache may not be fully initialised
         synchronized (cdmlibModelCache) {
             while(!cacheInitialised) {
                 try {