[exo-jcr-commits] exo-jcr SVN: r1419 - in jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src: main/java/org/exoplatform/services/jcr/impl and 2 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Jan 15 10:51:14 EST 2010


Author: areshetnyak
Date: 2010-01-15 10:51:13 -0500 (Fri, 15 Jan 2010)
New Revision: 1419

Modified:
   jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/LockManagerEntry.java
   jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryContainer.java
   jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/resources/binding.xml
   jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml
Log:
EXOJCR-332 : Add parameter class to lock manager configuration.

Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/LockManagerEntry.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/LockManagerEntry.java	2010-01-15 15:27:51 UTC (rev 1418)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/LockManagerEntry.java	2010-01-15 15:51:13 UTC (rev 1419)
@@ -22,7 +22,7 @@
  * @author <a href="mailto:Sergey.Kabashnyuk at gmail.com">Sergey Kabashnyuk</a>
  * @version $Id: LockManagerEntry.java 11907 2008-03-13 15:36:21Z ksm $
  */
-public class LockManagerEntry
+public class LockManagerEntry extends MappedParametrizedObjectEntry
 {
 
    private long timeout = -1;

Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryContainer.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryContainer.java	2010-01-15 15:27:51 UTC (rev 1418)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryContainer.java	2010-01-15 15:51:13 UTC (rev 1419)
@@ -267,15 +267,24 @@
             }
          }
 
-         if ( wsConfig.getLockManager() != null && wsConfig.getLockManager().getCacheConfig() != null)
+         
+         if (wsConfig.getLockManager() != null && wsConfig.getLockManager().getType() != null) 
          {
-            workspaceContainer.registerComponentImplementation(CacheableLockManager.class);
+            try
+            {
+               Class<?> lockManagerType = Class.forName(wsConfig.getLockManager().getType());
+               workspaceContainer.registerComponentImplementation(lockManagerType);
+            } catch (ClassNotFoundException e) {
+               throw new RepositoryConfigurationException("Class not found for workspace lock manager "
+                        + wsConfig.getLockManager().getType() + ", container " + wsConfig.getUniqueName()
+                        + " : " + e);
+            }
          }
          else
          {
             workspaceContainer.registerComponentImplementation(LockManagerImpl.class);
          }
-
+         
          // Query handler
          if (wsConfig.getQueryHandler() != null)
          {

Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/resources/binding.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/resources/binding.xml	2010-01-15 15:27:51 UTC (rev 1418)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/resources/binding.xml	2010-01-15 15:51:13 UTC (rev 1419)
@@ -65,10 +65,11 @@
     </structure>
 
     <structure name="lock-manager" field="lockManager" usage="optional">
+      <value name="class" field="type" style="attribute" usage="optional" />
       <value name="time-out" field="timeout" usage="optional" 
 			  deserializer="org.exoplatform.services.jcr.util.ConfigurationFormat.parseTime" />
       
-      <value name="cache-config" field="cacheConfig" usage="optional" />
+      <value name="jbosscache-configuration" field="cacheConfig" usage="optional" />
       
       <structure name="persister" field="persister" usage="optional">
         <value name="class" field="type" style="attribute" />

Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml	2010-01-15 15:27:51 UTC (rev 1418)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml	2010-01-15 15:51:13 UTC (rev 1419)
@@ -79,9 +79,9 @@
                      
                    </properties>
                </query-handler>
-               <lock-manager>
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManager">
                   <time-out>15m</time-out>
-                  <cache-config>conf/standalone/test-jbosscache-lockconfig.xml</cache-config>
+                  <jbosscache-configuration>conf/standalone/test-jbosscache-lockconfig.xml</jbosscache-configuration>
                </lock-manager>
             </workspace>
 
@@ -122,9 +122,9 @@
                      <property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
                   </properties>
                </query-handler>
-               <lock-manager>
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManager">
                   <time-out>15m</time-out>
-                  <cache-config>conf/standalone/test-jbosscache-lockconfig.xml</cache-config>
+                  <jbosscache-configuration>conf/standalone/test-jbosscache-lockconfig.xml</jbosscache-configuration>
                </lock-manager>
             </workspace>
 
@@ -165,9 +165,9 @@
                      <property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
                   </properties>
                </query-handler>
-               <lock-manager>
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManager">
                   <time-out>15m</time-out>
-                  <cache-config>conf/standalone/test-jbosscache-lockconfig.xml</cache-config>
+                  <jbosscache-configuration>conf/standalone/test-jbosscache-lockconfig.xml</jbosscache-configuration>
                </lock-manager>
             </workspace>
             
@@ -240,9 +240,9 @@
 								value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
 						</properties>
 					</query-handler>
-                    <lock-manager>
+                    <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManager">
                       <time-out>15m</time-out>
-                      <cache-config>conf/standalone/test-jbosscache-lockconfig.xml</cache-config>
+                      <jbosscache-configuration>conf/standalone/test-jbosscache-lockconfig.xml</jbosscache-configuration>
                     </lock-manager>
 				</workspace>
          </workspaces>
@@ -300,9 +300,9 @@
                      <property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
                   </properties>
                </query-handler>
-               <lock-manager>
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManager">
                   <time-out>15m</time-out>
-                  <cache-config>conf/standalone/test-jbosscache-lockconfig.xml</cache-config>
+                  <jbosscache-configuration>conf/standalone/test-jbosscache-lockconfig.xml</jbosscache-configuration>
                </lock-manager>
             </workspace>
 
@@ -349,9 +349,9 @@
                      <property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
                   </properties>
                </query-handler>
-               <lock-manager>
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManager">
                   <time-out>15m</time-out>
-                  <cache-config>conf/standalone/test-jbosscache-lockconfig.xml</cache-config>
+                  <jbosscache-configuration>conf/standalone/test-jbosscache-lockconfig.xml</jbosscache-configuration>
                </lock-manager>
             </workspace>
 
@@ -401,9 +401,9 @@
                      <property name="extractorTimeout" value="10"/>
                   </properties>
                </query-handler>
-               <lock-manager>
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManager">
                   <time-out>15m</time-out>
-                  <cache-config>conf/standalone/test-jbosscache-lockconfig.xml</cache-config>
+                  <jbosscache-configuration>conf/standalone/test-jbosscache-lockconfig.xml</jbosscache-configuration>
                </lock-manager>
             </workspace>
          </workspaces>



More information about the exo-jcr-commits mailing list