[exo-jcr-commits] exo-jcr SVN: r1616 - jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Jan 29 03:23:30 EST 2010


Author: nzamosenchuk
Date: 2010-01-29 03:23:30 -0500 (Fri, 29 Jan 2010)
New Revision: 1616

Modified:
   jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java
Log:
EXOJCR-425: If mux not enabled, but jGroups configuration file exists then it is used.

Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java	2010-01-28 16:45:14 UTC (rev 1615)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java	2010-01-29 08:23:30 UTC (rev 1616)
@@ -156,6 +156,25 @@
             throw new RepositoryConfigurationException("Error setting multiplexer configuration.", e);
          }
       }
+      else
+      {
+         // Multiplexer is not enabled. If jGroups configuration preset it is applied
+         String jgroupsConfigurationFilePath = parameterEntry.getParameterValue(JGROUPS_CONFIG, null);
+         if (jgroupsConfigurationFilePath != null)
+         {
+            try
+            {
+               cache.getConfiguration().setJgroupsConfigFile(
+                  configurationManager.getResource(jgroupsConfigurationFilePath));
+               log.info("Custom JGroups configuration set:"
+                  + configurationManager.getResource(jgroupsConfigurationFilePath));
+            }
+            catch (Exception e)
+            {
+               throw new RepositoryConfigurationException("Error setting JGroups configuration.", e);
+            }
+         }
+      }
       return cache;
    }
 }



More information about the exo-jcr-commits mailing list