Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-09-15 18:39:43 +0000
committerEike Stepper2012-09-15 18:39:43 +0000
commit661d7d2e8bb433cfa71ce43e2a8c63e383930ca7 (patch)
treec4c3d285d9579f64b9342cf31f4a34903511aa7a /plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse
parent2a3975c4861d26548f9dd802c574594d8b0c2abd (diff)
downloadcdo-661d7d2e8bb433cfa71ce43e2a8c63e383930ca7.tar.gz
cdo-661d7d2e8bb433cfa71ce43e2a8c63e383930ca7.tar.xz
cdo-661d7d2e8bb433cfa71ce43e2a8c63e383930ca7.zip
Avoid timeouts in writeLobs()
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse')
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/ObjectTypeTable.java28
1 files changed, 23 insertions, 5 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/ObjectTypeTable.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/ObjectTypeTable.java
index f087120de1..882561e070 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/ObjectTypeTable.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/ObjectTypeTable.java
@@ -77,12 +77,21 @@ public class ObjectTypeTable extends AbstractObjectTypeMapper
{
stmt = statementCache.getPreparedStatement(sqlSelect, ReuseProbability.MAX);
idHandler.setCDOID(stmt, 1, id);
- DBUtil.trace(stmt.toString());
+
+ if (DBUtil.isTracerEnabled())
+ {
+ DBUtil.trace(stmt.toString());
+ }
+
ResultSet resultSet = stmt.executeQuery();
if (!resultSet.next())
{
- DBUtil.trace("ClassID for CDOID " + id + " not found"); //$NON-NLS-1$ //$NON-NLS-2$
+ if (DBUtil.isTracerEnabled())
+ {
+ DBUtil.trace("ClassID for CDOID " + id + " not found"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
return null;
}
@@ -113,7 +122,12 @@ public class ObjectTypeTable extends AbstractObjectTypeMapper
idHandler.setCDOID(stmt, 1, id);
idHandler.setCDOID(stmt, 2, getMetaDataManager().getMetaID(type, timeStamp));
stmt.setLong(3, timeStamp);
- DBUtil.trace(stmt.toString());
+
+ if (DBUtil.isTracerEnabled())
+ {
+ DBUtil.trace(stmt.toString());
+ }
+
int result = stmt.executeUpdate();
if (result != 1)
@@ -145,9 +159,13 @@ public class ObjectTypeTable extends AbstractObjectTypeMapper
{
stmt = statementCache.getPreparedStatement(sqlDelete, ReuseProbability.MAX);
idHandler.setCDOID(stmt, 1, id);
- DBUtil.trace(stmt.toString());
- int result = stmt.executeUpdate();
+ if (DBUtil.isTracerEnabled())
+ {
+ DBUtil.trace(stmt.toString());
+ }
+
+ int result = stmt.executeUpdate();
if (result != 1)
{
throw new DBException("Object type could not be deleted: " + id); //$NON-NLS-1$

Back to the top