Author: nzamosenchuk
Date: 2010-02-10 10:48:06 -0500 (Wed, 10 Feb 2010)
New Revision: 1755
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
Log:
EXOJCR-470: If parameter is still defined and equals to "auto", it should be
replaced with correct value for given data base.
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java 2010-02-10
12:16:57 UTC (rev 1754)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java 2010-02-10
15:48:06 UTC (rev 1755)
@@ -113,6 +113,8 @@
public static final String JBOSSCACHE_JDBC_CL_NODE_COLUMN =
"jbosscache-cl-cache.jdbc.node.type";
public static final String JBOSSCACHE_JDBC_CL_FQN_COLUMN =
"jbosscache-cl-cache.jdbc.fqn.type";
+
+ public static final String JBOSSCACHE_JDBC_CL_AUTO = "auto";
/**
* Default lock time out. 30min
@@ -356,12 +358,15 @@
// else GENERIC, DB2 etc
// set parameters if not defined
- if (parameterEntry.getParameterValue(JBOSSCACHE_JDBC_CL_NODE_COLUMN, null) ==
null)
+ // if parameter is missing in configuration, then
getParameterValue(JBOSSCACHE_JDBC_CL_NODE_COLUMN, JBOSSCACHE_JDBC_CL_AUTO)
+ // will return JBOSSCACHE_JDBC_CL_AUTO. If parameter is present in configuration
and equals to "auto", then it should be replaced
+ // with correct value for given database
+ if (parameterEntry.getParameterValue(JBOSSCACHE_JDBC_CL_NODE_COLUMN,
JBOSSCACHE_JDBC_CL_AUTO).equalsIgnoreCase(JBOSSCACHE_JDBC_CL_AUTO))
{
parameterEntry.putParameterValue(JBOSSCACHE_JDBC_CL_NODE_COLUMN, blobType);
}
- if (parameterEntry.getParameterValue(JBOSSCACHE_JDBC_CL_FQN_COLUMN, null) ==
null)
+ if (parameterEntry.getParameterValue(JBOSSCACHE_JDBC_CL_FQN_COLUMN,
JBOSSCACHE_JDBC_CL_AUTO).equalsIgnoreCase(JBOSSCACHE_JDBC_CL_AUTO))
{
parameterEntry.putParameterValue(JBOSSCACHE_JDBC_CL_FQN_COLUMN, charType);
}