Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2013-05-16 04:25:13 +0000
committerEike Stepper2013-05-16 04:25:13 +0000
commitc6acc2e21bcfe559847f5b64abcbf94f3ea4dbbb (patch)
treee15b9fedf880747b310c80677825de49e70649ff
parent90aa24e3584a57602c6268f717bc33c51c6aa9bd (diff)
downloadcdo-c6acc2e21bcfe559847f5b64abcbf94f3ea4dbbb.tar.gz
cdo-c6acc2e21bcfe559847f5b64abcbf94f3ea4dbbb.tar.xz
cdo-c6acc2e21bcfe559847f5b64abcbf94f3ea4dbbb.zip
[406766] [DB] CDOServer throws "The object is already closeddrops/I20130517-0410
[90007-168]" errors with H2-DB https://bugs.eclipse.org/bugs/show_bug.cgi?id=406766
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalBranchingClassMapping.java41
1 files changed, 20 insertions, 21 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalBranchingClassMapping.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalBranchingClassMapping.java
index 95260bab00..13da4b20ad 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalBranchingClassMapping.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalBranchingClassMapping.java
@@ -367,6 +367,17 @@ public class HorizontalBranchingClassMapping extends AbstractHorizontalClassMapp
idHandler.setCDOID(stmt, 1, revision.getID());
stmt.setInt(2, branchID);
}
+
+ // Read singleval-attribute table always (even without modeled attributes!)
+ boolean success = readValuesFromStatement(stmt, revision, accessor);
+
+ // Read multival tables only if revision exists
+ if (success && revision.getVersion() >= CDOBranchVersion.FIRST_VERSION)
+ {
+ readLists(accessor, revision, listChunk);
+ }
+
+ return success;
}
catch (SQLException ex)
{
@@ -376,17 +387,6 @@ public class HorizontalBranchingClassMapping extends AbstractHorizontalClassMapp
{
DBUtil.close(stmt);
}
-
- // Read singleval-attribute table always (even without modeled attributes!)
- boolean success = readValuesFromStatement(stmt, revision, accessor);
-
- // Read multival tables only if revision exists
- if (success && revision.getVersion() >= CDOBranchVersion.FIRST_VERSION)
- {
- readLists(accessor, revision, listChunk);
- }
-
- return success;
}
public boolean readRevisionByVersion(IDBStoreAccessor accessor, InternalCDORevision revision, int listChunk)
@@ -394,7 +394,6 @@ public class HorizontalBranchingClassMapping extends AbstractHorizontalClassMapp
IIDHandler idHandler = getMappingStrategy().getStore().getIDHandler();
IDBPreparedStatement stmt = accessor.getDBConnection().prepareStatement(sqlSelectAttributesByVersion,
ReuseProbability.HIGH);
- boolean success;
try
{
@@ -403,7 +402,15 @@ public class HorizontalBranchingClassMapping extends AbstractHorizontalClassMapp
stmt.setInt(3, revision.getVersion());
// Read singleval-attribute table always (even without modeled attributes!)
- success = readValuesFromStatement(stmt, revision, accessor);
+ boolean success = readValuesFromStatement(stmt, revision, accessor);
+
+ // Read multival tables only if revision exists
+ if (success)
+ {
+ readLists(accessor, revision, listChunk);
+ }
+
+ return success;
}
catch (SQLException ex)
{
@@ -413,14 +420,6 @@ public class HorizontalBranchingClassMapping extends AbstractHorizontalClassMapp
{
DBUtil.close(stmt);
}
-
- // Read multival tables only if revision exists
- if (success)
- {
- readLists(accessor, revision, listChunk);
- }
-
- return success;
}
public IDBPreparedStatement createResourceQueryStatement(IDBStoreAccessor accessor, CDOID folderId, String name,

Back to the top