[jbpm-commits] JBoss JBPM SVN: r2594 - jbpm3/trunk/modules/core/src/main/java/org/jbpm/db.
do-not-reply at jboss.org
do-not-reply at jboss.org
Thu Oct 23 04:56:49 EDT 2008
Author: tom.baeyens at jboss.com
Date: 2008-10-23 04:56:49 -0400 (Thu, 23 Oct 2008)
New Revision: 2594
Modified:
jbpm3/trunk/modules/core/src/main/java/org/jbpm/db/JbpmSchema.java
Log:
changed collection of table names. it was based on connection.getTables (which turned out not to be portable across DBs) and now its based on the hibernate mapping information
Modified: jbpm3/trunk/modules/core/src/main/java/org/jbpm/db/JbpmSchema.java
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/db/JbpmSchema.java 2008-10-23 08:54:42 UTC (rev 2593)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/db/JbpmSchema.java 2008-10-23 08:56:49 UTC (rev 2594)
@@ -182,27 +182,15 @@
{
// delete all the data in the jbpm tables
List jbpmTableNames = new ArrayList();
- try
+ Iterator iter = configuration.getTableMappings();
+ while (iter.hasNext())
{
- createConnection();
- ResultSet resultSet = connection.getMetaData().getTables(null, null, null, null);
- while (resultSet.next())
+ Table table = (Table)iter.next();
+ if (table.isPhysicalTable())
{
- String tableName = resultSet.getString("TABLE_NAME");
- if ((tableName != null) && (tableName.length() > 5) && (JBPM_TABLE_PREFIX.equalsIgnoreCase(tableName.substring(0, 5))))
- {
- jbpmTableNames.add(tableName);
- }
+ jbpmTableNames.add(table.getName());
}
}
- catch (SQLException e)
- {
- throw new JbpmException("couldn't get the jbpm table names");
- }
- finally
- {
- closeConnection();
- }
return jbpmTableNames;
}
More information about the jbpm-commits
mailing list