summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Pielmann2012-05-03 04:03:44 (EDT)
committerManik Kishore2012-05-08 03:43:50 (EDT)
commitf59066c42efc427589be75e05f73c0459700fa0a (patch)
tree6114934b6cc6342d095e8e21bcbc7c06d559d2d3
parentf07e33bd0d8c893a49d80ec6e28980bc9a6667df (diff)
downloadorg.eclipse.stardust.engine-f59066c42efc427589be75e05f73c0459700fa0a.zip
org.eclipse.stardust.engine-f59066c42efc427589be75e05f73c0459700fa0a.tar.gz
org.eclipse.stardust.engine-f59066c42efc427589be75e05f73c0459700fa0a.tar.bz2
Upgrade - 7.0 upgrade job is not running while upgrading from 4.0 or 5.0.
git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/engine@56020 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--stardust-engine-core/src/main/java/org/eclipse/stardust/engine/core/upgrade/jobs/R6_0_0from5_2_0RuntimeJob.java83
1 files changed, 56 insertions, 27 deletions
diff --git a/stardust-engine-core/src/main/java/org/eclipse/stardust/engine/core/upgrade/jobs/R6_0_0from5_2_0RuntimeJob.java b/stardust-engine-core/src/main/java/org/eclipse/stardust/engine/core/upgrade/jobs/R6_0_0from5_2_0RuntimeJob.java
index 89fa20c..b70749e 100644
--- a/stardust-engine-core/src/main/java/org/eclipse/stardust/engine/core/upgrade/jobs/R6_0_0from5_2_0RuntimeJob.java
+++ b/stardust-engine-core/src/main/java/org/eclipse/stardust/engine/core/upgrade/jobs/R6_0_0from5_2_0RuntimeJob.java
@@ -13,9 +13,18 @@ package org.eclipse.stardust.engine.core.upgrade.jobs;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
-import java.sql.*;
-import java.util.*;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
import java.util.Map.Entry;
+import java.util.Set;
import javax.sql.DataSource;
@@ -32,13 +41,29 @@ import org.eclipse.stardust.engine.core.model.beans.NullConfigurationVariablesPr
import org.eclipse.stardust.engine.core.persistence.jdbc.DBMSKey;
import org.eclipse.stardust.engine.core.persistence.jdbc.IdentifiablePersistentBean;
import org.eclipse.stardust.engine.core.persistence.jdbc.QueryUtils;
+import org.eclipse.stardust.engine.core.persistence.jdbc.Session;
+import org.eclipse.stardust.engine.core.persistence.jdbc.SessionFactory;
import org.eclipse.stardust.engine.core.persistence.jdbc.SessionProperties;
import org.eclipse.stardust.engine.core.preferences.XmlPreferenceWriter;
-import org.eclipse.stardust.engine.core.runtime.beans.*;
+import org.eclipse.stardust.engine.core.runtime.beans.AuditTrailPartitionBean;
+import org.eclipse.stardust.engine.core.runtime.beans.Constants;
+import org.eclipse.stardust.engine.core.runtime.beans.LargeStringHolder;
+import org.eclipse.stardust.engine.core.runtime.beans.ModelDeploymentBean;
+import org.eclipse.stardust.engine.core.runtime.beans.ModelManagerFactory;
+import org.eclipse.stardust.engine.core.runtime.beans.ModelPersistorBean;
+import org.eclipse.stardust.engine.core.runtime.beans.ModelRefBean;
+import org.eclipse.stardust.engine.core.runtime.beans.ProcessInstanceBean;
+import org.eclipse.stardust.engine.core.runtime.beans.PropertyPersistor;
+import org.eclipse.stardust.engine.core.runtime.beans.UserParticipantLink;
import org.eclipse.stardust.engine.core.runtime.beans.removethis.SecurityProperties;
import org.eclipse.stardust.engine.core.runtime.setup.RuntimeSetup;
import org.eclipse.stardust.engine.core.runtime.utils.Permissions;
-import org.eclipse.stardust.engine.core.upgrade.framework.*;
+import org.eclipse.stardust.engine.core.upgrade.framework.AlterTableInfo;
+import org.eclipse.stardust.engine.core.upgrade.framework.CreateTableInfo;
+import org.eclipse.stardust.engine.core.upgrade.framework.DatabaseHelper;
+import org.eclipse.stardust.engine.core.upgrade.framework.DropTableInfo;
+import org.eclipse.stardust.engine.core.upgrade.framework.RuntimeItem;
+import org.eclipse.stardust.engine.core.upgrade.framework.UpgradeException;
@@ -275,34 +300,38 @@ public class R6_0_0from5_2_0RuntimeJob extends DbmsAwareRuntimeUpgradeJob
//Create MODEL_DEP_LCK table
- DatabaseHelper.createTable(item, new CreateTableInfo(ModelDeploymentBean.LOCK_TABLE_NAME)
+ Session session = (Session) SessionFactory.getSession(SessionFactory.AUDIT_TRAIL);
+ if (session.getDBDescriptor().getUseLockTablesDefault())
{
- private final FieldInfo OID = new FieldInfo(MODEL_DEP_FIELD__OID, Long.TYPE,
- 0, true);
-
- private final IndexInfo IDX1 = new IndexInfo(ModelDeploymentBean.LOCK_INDEX_NAME, true, new FieldInfo[] {OID});
-
- @Override
- public FieldInfo[] getFields()
+ DatabaseHelper.createTable(item, new CreateTableInfo(
+ ModelDeploymentBean.LOCK_TABLE_NAME)
{
- return new FieldInfo[] {
- OID
- };
- }
+ private final FieldInfo OID = new FieldInfo(MODEL_DEP_FIELD__OID, Long.TYPE,
+ 0, true);
- @Override
- public IndexInfo[] getIndexes()
- {
- return new IndexInfo[] {IDX1};
- }
+ private final IndexInfo IDX1 = new IndexInfo(
+ ModelDeploymentBean.LOCK_INDEX_NAME, true, new FieldInfo[] {OID});
- @Override
- public String getSequenceName()
- {
- return null;
- }
+ @Override
+ public FieldInfo[] getFields()
+ {
+ return new FieldInfo[] {OID};
+ }
- }, this);
+ @Override
+ public IndexInfo[] getIndexes()
+ {
+ return new IndexInfo[] {IDX1};
+ }
+
+ @Override
+ public String getSequenceName()
+ {
+ return null;
+ }
+
+ }, this);
+ }
//Alter Process Instance Table