summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntje Fuhrmann2012-09-04 06:28:13 (EDT)
committerStephan Born2012-09-04 06:28:13 (EDT)
commit6a3904331b91c4a46bff2d64c98e2f5a214c4550 (patch)
tree196388ea995d34bb5e44502b5ee2249595d690cf
parentcf53f3238749a4ff204fee6e6e78fed599a3de31 (diff)
downloadorg.eclipse.stardust.engine-6a3904331b91c4a46bff2d64c98e2f5a214c4550.zip
org.eclipse.stardust.engine-6a3904331b91c4a46bff2d64c98e2f5a214c4550.tar.gz
org.eclipse.stardust.engine-6a3904331b91c4a46bff2d64c98e2f5a214c4550.tar.bz2
Jira-ID: CRNT-25816
Engine accepts cluster definition file which does contain both columns sValueColumn and nValueColumn for a single data-slot. git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/engine@58895 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--stardust-engine-core/src/main/java/org/eclipse/stardust/engine/core/runtime/beans/SchemaHelper.java13
-rw-r--r--stardust-engine-core/src/main/java/org/eclipse/stardust/engine/core/runtime/setup/RuntimeSetup.java12
2 files changed, 21 insertions, 4 deletions
diff --git a/stardust-engine-core/src/main/java/org/eclipse/stardust/engine/core/runtime/beans/SchemaHelper.java b/stardust-engine-core/src/main/java/org/eclipse/stardust/engine/core/runtime/beans/SchemaHelper.java
index e27823b..6f2b943 100644
--- a/stardust-engine-core/src/main/java/org/eclipse/stardust/engine/core/runtime/beans/SchemaHelper.java
+++ b/stardust-engine-core/src/main/java/org/eclipse/stardust/engine/core/runtime/beans/SchemaHelper.java
@@ -1012,7 +1012,18 @@ public class SchemaHelper
}
}
- DataCluster[] cluster = RuntimeSetup.instance().getDataClusterSetup();
+ DataCluster[] cluster;
+ try
+ {
+ cluster = RuntimeSetup.instance().getDataClusterSetup();
+ }
+ catch (PublicException e)
+ {
+ LargeStringHolder.deleteAllForOID(prop.getOID(), PropertyPersistor.class);
+ prop.delete();
+ session.save();
+ throw e;
+ }
final String schemaName = Parameters.instance().getString(
SessionFactory.AUDIT_TRAIL + SessionProperties.DS_SCHEMA_SUFFIX,
diff --git a/stardust-engine-core/src/main/java/org/eclipse/stardust/engine/core/runtime/setup/RuntimeSetup.java b/stardust-engine-core/src/main/java/org/eclipse/stardust/engine/core/runtime/setup/RuntimeSetup.java
index d0fb764..e207625 100644
--- a/stardust-engine-core/src/main/java/org/eclipse/stardust/engine/core/runtime/setup/RuntimeSetup.java
+++ b/stardust-engine-core/src/main/java/org/eclipse/stardust/engine/core/runtime/setup/RuntimeSetup.java
@@ -147,12 +147,18 @@ public class RuntimeSetup implements XMLConstants
String ignorePreparedStatementsAttr
= dsNode.getAttribute(DATA_SLOT_IGNORE_PREPARED_STATEMENTS_ATT);
boolean ignorePreparedStatements = Boolean.valueOf(ignorePreparedStatementsAttr);
-
+ String nValueColumn = dsNode.getAttribute(DATA_SLOT_NVALCOLUMN_ATT);
+ String sValueColumn = dsNode.getAttribute(DATA_SLOT_SVALCOLUMN_ATT);
+ if (StringUtils.isNotEmpty(nValueColumn)
+ && StringUtils.isNotEmpty(sValueColumn))
+ {
+ throw new PublicException(
+ "A single data-slot must not contain both storage types sValueColumn and nValueColumn.");
+ }
slots.add(new DataSlot(modelId, dataId, attribute,
dsNode.getAttribute(DATA_SLOT_OIDCOLUMN_ATT),
dsNode.getAttribute(DATA_SLOT_TYPECOLUMN_ATT),
- dsNode.getAttribute(DATA_SLOT_NVALCOLUMN_ATT),
- dsNode.getAttribute(DATA_SLOT_SVALCOLUMN_ATT),
+ nValueColumn, sValueColumn,
ignorePreparedStatements));
}
else