[exo-jcr-commits] exo-jcr SVN: r4390 - in jcr/trunk: exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr and 1 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed May 18 10:19:40 EDT 2011
Author: nzamosenchuk
Date: 2011-05-18 10:19:40 -0400 (Wed, 18 May 2011)
New Revision: 4390
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCWorkspaceDataContainer.java
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/jdbc-data-container-config.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/data-container.xml
Log:
EXOJCR-1352: Warning if wrong IL database configuration added, Use-sns-new-connection set to false by default.
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCWorkspaceDataContainer.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCWorkspaceDataContainer.java 2011-05-18 14:12:54 UTC (rev 4389)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCWorkspaceDataContainer.java 2011-05-18 14:19:40 UTC (rev 4390)
@@ -420,9 +420,8 @@
}
catch (RepositoryConfigurationException e)
{
- this.checkSNSNewConnection =
- DBConstants.DB_DIALECT_SYBASE.equals(this.dbDialect)
- || DBConstants.DB_DIALECT_HSQLDB.equals(this.dbDialect) ? false : true;
+ // don't use new connection by default
+ this.checkSNSNewConnection = false;
}
// ------------- Values swap config ------------------
@@ -890,7 +889,7 @@
{
return containerName;
}
-
+
/**
* {@inheritDoc}
*/
@@ -926,6 +925,22 @@
*/
public void start()
{
+ // if isolation level lesser then TRANSACTION_READ_COMMITTED, print a warning
+ try
+ {
+ if (getConnectionFactory().getJdbcConnection().getTransactionIsolation() < Connection.TRANSACTION_READ_COMMITTED)
+ {
+ LOG.warn("Wrong RDBMS configuration, please check and set READ_COMMITTED or higher isolation level.");
+ }
+ }
+ catch (SQLException e)
+ {
+ LOG.error("Error checking isolation level configuration.", e);
+ }
+ catch (RepositoryException e)
+ {
+ LOG.error("Error checking isolation level configuration.", e);
+ }
}
/**
@@ -1279,7 +1294,7 @@
restoreTableRule.setConvertColumnIndex(convertColumnIndex);
}
tables.put(dstTableName, restoreTableRule);
-
+
restorers.add(new DBRestore(storageDir, jdbcConn, tables, wsConfig, swapCleaner));
// prepare value storage restorer
@@ -1394,11 +1409,11 @@
{
if (isReindexingSupport())
{
- return new JdbcNodeDataIndexingIterator(connFactory, pageSize);
+ return new JdbcNodeDataIndexingIterator(connFactory, pageSize);
}
throw new UnsupportedOperationException(
- "The method getNodeDataIndexingIterator is not supported for this type of connection "
- + "use the complex queries instead");
+ "The method getNodeDataIndexingIterator is not supported for this type of connection "
+ + "use the complex queries instead");
}
/**
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/jdbc-data-container-config.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/jdbc-data-container-config.xml 2011-05-18 14:12:54 UTC (rev 4389)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/jdbc-data-container-config.xml 2011-05-18 14:19:40 UTC (rev 4390)
@@ -57,10 +57,10 @@
</itemizedlist></para>
<para><note>
- <para>Please note, that JCR supports only READ_COMMITED isolation
- level and any other RDBMS configurations can cause some side-effects
- and issues. So, please, make sure proper isolation level is configured
- on database server side.</para>
+ <para>Please note, that JCR requires at least READ_COMMITED isolation
+ level and other RDBMS configurations can cause some side-effects and
+ issues. So, please, make sure proper isolation level is configured on
+ database server side.</para>
</note>Each database software supports ANSI SQL standards but also has
its own specifics. So, each database has its own configuration in eXo JCR
as a database dialect parameter. If you need a more detailed configuration
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/data-container.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/data-container.xml 2011-05-18 14:12:54 UTC (rev 4389)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/data-container.xml 2011-05-18 14:19:40 UTC (rev 4390)
@@ -96,18 +96,6 @@
<programlisting>boolean isCheckSNSNewConnection();
</programlisting>
- <important>
- <title>New connection for SNS</title>
-
- <para>It is neccessary to check the name of nodes when they have the
- same names. Usually, new Workspace Storage Connection is used for this
- purpose. The improvement came from JDBC Workspace Data Container,
- which shows a better performance on Oracle RDBMS when using new
- connection for checking SNS existence. But later, this causes to
- deadlocks on Sybase RDBMS, so this feature is made as an optional and
- configurable one.</para>
- </important>
-
<para>Container initialization is only based on a configuration. After
the container has been created, it's not possible to change parameters.
Configuration consists of implementation class and set of properties and
More information about the exo-jcr-commits
mailing list