Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2013-03-03 12:50:30 -0500
committerEike Stepper2013-03-07 08:44:01 -0500
commitc6e79fb5a2912ff61377afeda3235c6a5ff6084f (patch)
treecd532fd16a1e14ed3d2fc2859098ec477e02aff7
parentda92d60f79c7828b1c7108a973f9e247826caeb9 (diff)
downloadcdo-c6e79fb5a2912ff61377afeda3235c6a5ff6084f.tar.gz
cdo-c6e79fb5a2912ff61377afeda3235c6a5ff6084f.tar.xz
cdo-c6e79fb5a2912ff61377afeda3235c6a5ff6084f.zip
[401763] Make CDO Server more robust against data dictionary changes
https://bugs.eclipse.org/bugs/show_bug.cgi?id=401763
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/IDBSchemaTransaction.java3
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/DBSchemaTransaction.java12
2 files changed, 12 insertions, 3 deletions
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/IDBSchemaTransaction.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/IDBSchemaTransaction.java
index 5d52c6c863..9245a08350 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/IDBSchemaTransaction.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/IDBSchemaTransaction.java
@@ -11,6 +11,7 @@
package org.eclipse.net4j.db;
import org.eclipse.net4j.db.ddl.IDBSchema;
+import org.eclipse.net4j.db.ddl.delta.IDBSchemaDelta;
import org.eclipse.net4j.util.collection.Closeable;
/**
@@ -25,5 +26,7 @@ public interface IDBSchemaTransaction extends IDBElement, Closeable
public IDBSchema getDBSchema();
+ public IDBSchemaDelta getDBSchemaDelta();
+
public void commit();
}
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/DBSchemaTransaction.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/DBSchemaTransaction.java
index a7811627e5..8ce4d64b11 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/DBSchemaTransaction.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/DBSchemaTransaction.java
@@ -46,16 +46,22 @@ public final class DBSchemaTransaction extends DBElement implements IDBSchemaTra
return dbSchema;
}
+ public IDBSchemaDelta getDBSchemaDelta()
+ {
+ DBInstance dbInstance = dbConnection.getDBInstance();
+ DBSchema oldSchema = (DBSchema)dbInstance.getDBSchema();
+ return dbSchema.compare(oldSchema);
+ }
+
public void commit()
{
DBInstance dbInstance = dbConnection.getDBInstance();
+ DBSchema oldSchema = (DBSchema)dbInstance.getDBSchema();
+ IDBSchemaDelta delta = dbSchema.compare(oldSchema);
IDBAdapter dbAdapter = dbInstance.getDBAdapter();
Connection connection = dbConnection.getSQLConnection();
- DBSchema oldSchema = (DBSchema)dbInstance.getDBSchema();
- IDBSchemaDelta delta = dbSchema.compare(oldSchema);
-
try
{
oldSchema.unlock();

Back to the top