Commits

Anonymous committed eff9645

Upgrade to opensymphony common build (check out opensymphony project alongside osworkflow
JDBC testcase now deletes tables in tearDown
Specify custom mckoi hibernate dialect that specifies if exists on drop table
Upgrade mckoi to 1.0.3

Comments (0)

Files changed (13)

-<project default="jar" basedir=".">
+<project name="workflow" default="jar" basedir=".">
 
-  <property file="build.properties"/>
-  <path id="cp">
-    <fileset dir="lib">
-      <include name="**/*.jar"/>
-      <exclude name="**/jalopy/**" />
-    </fileset>
-  </path>
-
+  <property name="src.test" location="src/test"/>
+  <property name="jar.manifest" value="src/etc/deployment/ejb/manifest.txt" />
+  
+  <import file="../opensymphony/common/osbuild.xml" />
+  
   <path id="jalopy.classpath">
     <fileset dir="lib/build/jalopy">
       <include name="*.jar"/>
 
   <taskdef name="ejbdoclet" classname="xdoclet.modules.ejb.EjbDocletTask" classpathref="cp"/>
 
-  <target name="init">
-    <tstamp/>
-    <property name="lib" location="lib"/>
-    <property name="lib.core" value="${lib}/core"/>
+  <target name="init" depends="common.init">
     <property name="lib.designer" value="${lib}/designer"/>
-    <property name="lib.build" value="${lib}/build"/>
-    <property name="lib.optional" value="${lib}/optional"/>
 
-    <property name="src" location="src"/>
-    <property name="src.java" value="${src}/java"/>
-    <property name="src.test" value="${src}/test"/>
     <property name="src.client" value="${src}/designer"/>
     <property name="src.etc" value="${src}/etc"/>
     <property name="src.webapp" value="${src}/webapp"/>
     <property name="propertyset.jar" value="propertyset-1.3-25Jan05.jar"/>
     <property name="oscore.jar" value="oscore-2.2.2.jar"/>
-    <property name="build" location="build"/>
-    <property name="build.test" value="${build}/test"/>
-    <property name="build.java" value="${build}/java"/>
     <property name="build.client" value="${build}/designer"/>
 
-    <property name="dist" location="dist"/>
     <property name="dist.client" value="${dist}/designer"/>
     <property name="www" location="www"/>
-    <property name="dist.docs" value="${dist}/docs"/>
-
-    <property name="docs" location="docs"/>
-
-    <property name="packages" value="com.opensymphony.*"/>
-
-    <property name="test" value="*"/>
-
-    <available property="junit.available" classname="junit.framework.TestCase"/>
-    <available property="clover.available" classname="org.apache.tools.ant.taskdefs.CloverCompilerAdapter"/>
 
 		<path id="client.classpath">
 			<fileset dir="lib/designer">
 		</path>
   </target>
 
-  <target name="junit-check" depends="init" unless="junit.available">
-    <fail message="Cannot run test cases. Please copy lib/build/junit-3.8.1.jar to ${ant.home}/lib"/>
-  </target>
-
-  <target name="clover-check" depends="init" unless="clover.available">
-    <fail message="Cannot run coverage tests. Please copy lib/build/clover-1.2.3.jar to ${ant.home}/lib"/>
-  </target>
-
-  <target name="clean" depends="init" description="Remove all compiled files and generated sources">
-    <delete dir="${build}"/>
-    <delete dir="${dist}"/>
+  <target name="clean" depends="common.clean" description="Remove all compiled files and generated sources">
     <delete>
       <fileset dir="${src.java}/com/opensymphony/workflow/spi/ejb">
         <exclude name="*EJB*.java"/>
         <exclude name="*EJB*.java"/>
       </fileset>
     </delete>
-    <delete dir="clover-db" />
   </target>
 
   <target name="ejbdoclet" depends="init">
     </ejbdoclet>
   </target>
 
-  <target name="java" depends="ejbdoclet,format" description="Compile all java sources">
-    <mkdir dir="${build.java}"/>
-    <copy filtering="no" todir="${build.java}">
-      <fileset dir="${src.java}">
-        <exclude name="**/*.java"/>
-        <exclude name="**/package.html"/>
-      </fileset>
-    </copy>
-
-    <javac srcdir="${src.java}" destdir="${build.java}" source="1.3" target="1.3" classpathref="cp" debug="on"/>
-  </target>
-
-  <target name="test" depends="clover-check,init-clover,junit-check,ejbdoclet" description="Run all unit tests">
-    <jalopy fileformat="unix" convention="${src}/etc/jalopy.xml" history="file" historymethod="adler32" loglevel="error" threads="2" classpathref="cp">
-      <fileset dir="${src.test}">
-        <include name="**/*.java"/>
-      </fileset>
-    </jalopy>
-    <taskdef name="junit" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"/>
-
+  <target name="test-compile" depends="common.test-compile" description="Compile test classes">
     <mkdir dir="${build.test}/META-INF"/>
     <copy todir="${build.test}/META-INF/">
       <fileset dir="${docs}">
         <include name="*.dtd" />
       </fileset>
     </copy>
-    <javac srcdir="${src.java}" destdir="${build.test}" debug="on" classpathref="cp" compiler="org.apache.tools.ant.taskdefs.CloverCompilerAdapter"/>
-    <javac srcdir="${src.test}" destdir="${build.test}" classpathref="cp" debug="on"/>
-    <copy todir="${build.test}">
-      <fileset dir="${src.test}">
-        <include name="**/*.xml" />
-        <include name="**/*.properties"/>
-        <include name="**/*.sql"/>
-      </fileset>
-    </copy>
-    <copy todir="${build.test}">
-      <fileset dir="${src.java}">
-        <include name="**/*.xml"/>
-        <include name="**/*.properties"/>
-      </fileset>
-    </copy>
-    <mkdir dir="${dist.docs}/junit"/>
-    <junit printsummary="withOutAndErr" haltonfailure="no" haltonerror="no" showoutput="true" fork="true">
-      <classpath>
-        <pathelement location="${build.test}"/>
-        <path refid="cp"/>
-      </classpath>
-
-      <formatter type="xml"/>
-
-      <batchtest todir="${dist.docs}/junit">
-        <fileset dir="${src.test}">
-          <include name="**/${test}TestCase.java"/>
-        </fileset>
-      </batchtest>
-    </junit>
   </target>
 
-  <target name="format" depends="init">
+  <target name="precompile" depends="ejbdoclet">
     <jalopy fileformat="unix" convention="${src}/etc/jalopy.xml" history="file" historymethod="adler32" loglevel="error" threads="2" classpathref="cp">
       <fileset dir="${src.java}">
         <include name="**/*.java"/>
       </fileset>
-      <!-- <fileset dir="${src.test}">
-          <include name="**/*.java" />
-
+      <fileset dir="${src.test}">
+        <include name="**/*.java" />
       </fileset>
-      -->
     </jalopy>
-  </target>
-
-  <target name="init-clover" depends="init">
-    <taskdef resource="clovertasks"/>
-    <typedef resource="clovertypes"/>
-    <mkdir dir="clover-db" />
-    <clover-setup initstring="clover-db/coverage.db" />
-  </target>
-
-  <target name="jar" depends="java" description="Build osworkflow dist jar file">
-    <mkdir dir="${dist}"/>
     <copy todir="${build.java}/META-INF">
       <fileset dir="${docs}">
         <include name="*.dtd"/>
       </fileset>
     </copy>
-    <jar jarfile="${dist}/${name}-${version}.jar" manifest="${src.etc}/deployment/ejb/manifest.txt">
-	    <fileset dir="${build.java}" />
-    </jar>
   </target>
 
   <target name="example-war" depends="jar" description="Build example war web application">
     <ear appxml="${build}/application.xml" earfile="${dist}/${name}-${version}-example.ear" basedir="${build}/tmp" />
   </target>
 
-  <target name="client" depends="java" description="Build the designer client sources">
+  <target name="client" depends="compile" description="Build the designer client sources">
     <mkdir dir="${build.client}/META-INF"/>
     <javac classpathref="client.classpath" srcdir="${src.client}" destdir="${build.client}" source="1.4" target="1.4"/>
     <copy todir="${build.client}/META-INF">
     <signjar signedjar="${dist.docs}/designer/forms.jar" alias="opensymphony" jar="${lib.designer}/forms.jar" storepass="123456" keystore="${lib.build}/OSKeystore" />
   </target>
 
-  <target name="javadocs" depends="init" description="Build javadocs">
-    <mkdir dir="${dist.docs}/api"/>
-    <javadoc sourcepath="${src.java}" stylesheetfile="${docs}/api.css" destdir="${dist.docs}/api" packagenames="${packages}" classpathref="cp" author="true" version="true" windowTitle="${name} ${version} API" doctitle="${name}" footer="See &lt;a href=&quot;http://www.opensymphony.com&quot;&gt;www.opensymphony.com&lt;/a&gt; for more information." use="true" verbose="false"/>
-  </target>
-
-  <target name="clover.report" depends="test" description="Generate clover coverage reports">
-    <clover-report>
-      <current title="OSWorkflow Coverage Report" outfile="${dist.docs}/clover">
-        <format type="html" />
-      </current>
-    </clover-report>
-  </target>
-
-  <target name="junit.report" depends="test" description="Generate junit test results reports">
-    <junitreport todir="${dist.docs}/junit">
-      <fileset dir="${dist.docs}/junit">
-        <include name="TEST-*.xml"/>
-      </fileset>
-      <report format="frames" todir="${dist.docs}/junit" />
-    </junitreport>
-  </target>
-
-  <target name="docs" depends="javadocs, reports" description="Build all documentation">
-    <copy todir="${dist.docs}">
-      <fileset dir="${docs}"/>
-    </copy>
-  </target>
-
   <target name="website" depends="javadocs, webstart" description="Build all documentation">
     <copy todir="${dist.docs}">
       <fileset dir="${docs}"/>
     </copy>
   </target>
 
-  <target name="reports" depends="clover.report, junit.report" description="Generate junit and clover reports"/>
-
   <target name="dist" depends="client-jar, example-war, docs" description="Build distribution zipfile">
     <mkdir dir="${dist}/zip"/>
     <mkdir dir="${dist}/zip/docs"/>

lib/build/mckoidb.jar

Binary file modified.

src/java/com/opensymphony/workflow/spi/jdbc/JDBCWorkflowStore.java

                 }
             }
 
-            System.out.println("Query is: " + qry.toString());
-
+            //System.out.println("Query is: " + qry.toString());
             return doExpressionQuery(qry.toString(), columnName, values);
         }
     }

src/test/com/opensymphony/workflow/spi/DatabaseHelper.java

-/*
- * Copyright (c) 2002-2003 by OpenSymphony
- * All rights reserved.
- */
-package com.opensymphony.workflow.spi;
-
-import junit.framework.Assert;
-
-import net.sf.hibernate.SessionFactory;
-import net.sf.hibernate.cfg.Configuration;
-import net.sf.hibernate.tool.hbm2ddl.SchemaExport;
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import java.io.*;
-
-import java.net.URL;
-
-import java.sql.Connection;
-import java.sql.SQLException;
-import java.sql.Statement;
-
-import javax.naming.InitialContext;
-
-import javax.sql.DataSource;
-
-
-/**
- * @author Eric Pugh
- *
- * This helper class populates a test database.
- */
-public class DatabaseHelper {
-    //~ Static fields/initializers /////////////////////////////////////////////
-
-    private static final Log log = LogFactory.getLog(DatabaseHelper.class);
-
-    //~ Methods ////////////////////////////////////////////////////////////////
-
-    /**
-     * Create the database by loading a URL pointing at a SQL script.
-     */
-    public static void createDatabase(URL url) {
-        Assert.assertNotNull("Database url is null", url);
-
-        try {
-            String sql = getDatabaseCreationScript(url);
-            createDatabase(sql);
-        } catch (IOException e) {
-            log.error(e.getMessage(), e);
-        }
-    }
-
-    /**
-     * Create a new database and initialize it with the specified sql script.
-     * @param sql the sql to execute
-     */
-    public static void createDatabase(String sql) {
-        Connection connection;
-        Statement statement = null;
-        String sqlLine = null;
-
-        try {
-            InitialContext context = new InitialContext();
-            DataSource ds = (DataSource) context.lookup("jdbc/CreateDS");
-            connection = ds.getConnection();
-            statement = connection.createStatement();
-
-            String[] sqls = StringUtils.split(sql, ";");
-
-            for (int i = 0; i < sqls.length; i++) {
-                sqlLine = StringUtils.stripToEmpty(sqls[i]);
-                sqlLine = StringUtils.replace(sqlLine, "\r", "");
-                sqlLine = StringUtils.replace(sqlLine, "\n", "");
-
-                //String s = sqls[i];
-                if ((sqlLine.length() > 0) && (sqlLine.charAt(0) != '#')) {
-                    try {
-                        statement.executeQuery(sqlLine);
-                    } catch (SQLException e) {
-                        if (sqlLine.toLowerCase().indexOf("drop") == -1) {
-                            log.error("Error executing " + sqlLine, e);
-                        }
-                    }
-                }
-            }
-        } catch (Exception e) {
-            log.error("Database creation error.  sqlLine:" + sqlLine, e);
-        } finally {
-            if (statement != null) {
-                try {
-                    statement.close();
-                } catch (Exception ex) {
-                    //not catch
-                }
-            }
-        }
-    }
-
-    /**
-      * Use the default Hibernate *.hbm.xml files.  These build the primary keys
-      * based on an identity or sequence, whatever is native to the database.
-      * @throws Exception
-      */
-    public static SessionFactory createHibernateSessionFactory() throws Exception {
-        Configuration configuration = new Configuration();
-
-        //cfg.addClass(HibernateHistoryStep.class);
-        URL currentStep = DatabaseHelper.class.getResource("/com/opensymphony/workflow/spi/hibernate/HibernateCurrentStep.hbm.xml");
-        URL historyStep = DatabaseHelper.class.getResource("/com/opensymphony/workflow/spi/hibernate/HibernateHistoryStep.hbm.xml");
-        URL workflowEntry = DatabaseHelper.class.getResource("/com/opensymphony/workflow/spi/hibernate/HibernateWorkflowEntry.hbm.xml");
-        URL propertySet = DatabaseHelper.class.getResource("/com/opensymphony/module/propertyset/hibernate/PropertySetItemImpl.hbm.xml");
-        Assert.assertTrue(currentStep != null);
-        Assert.assertTrue(historyStep != null);
-        Assert.assertTrue(workflowEntry != null);
-        Assert.assertTrue(propertySet != null);
-        configuration.addURL(currentStep);
-        configuration.addURL(historyStep);
-        configuration.addURL(workflowEntry);
-        configuration.addURL(propertySet);
-
-        new SchemaExport(configuration).create(false, true);
-
-        return configuration.buildSessionFactory();
-    }
-
-    private static String getDatabaseCreationScript(URL url) throws IOException {
-        InputStreamReader reader = new InputStreamReader(url.openStream());
-        StringBuffer sb = new StringBuffer(100);
-        int c = 0;
-
-        while (c > -1) {
-            c = reader.read();
-
-            if (c > -1) {
-                sb.append((char) c);
-            }
-        }
-
-        return sb.toString();
-    }
-}

src/test/com/opensymphony/workflow/spi/hibernate/HibernateFunctionalWorkflowTestCase.java

 import com.opensymphony.workflow.config.Configuration;
 import com.opensymphony.workflow.config.DefaultConfiguration;
 import com.opensymphony.workflow.spi.AbstractFunctionalWorkflowTest;
-import com.opensymphony.workflow.spi.DatabaseHelper;
+import com.opensymphony.workflow.util.DatabaseHelper;
 
 import net.sf.hibernate.SessionFactory;
 
 
     protected void setUp() throws Exception {
         super.setUp();
-        DatabaseHelper.createDatabase("");
+        DatabaseHelper.runScript("", "jdbc/CreateDS");
 
         factory = DatabaseHelper.createHibernateSessionFactory();
 

src/test/com/opensymphony/workflow/spi/hibernate/SpringHibernateFunctionalWorkflowTestCase.java

 
 import com.opensymphony.workflow.config.Configuration;
 import com.opensymphony.workflow.spi.AbstractFunctionalWorkflowTest;
-import com.opensymphony.workflow.spi.DatabaseHelper;
+import com.opensymphony.workflow.util.DatabaseHelper;
 
 import org.springframework.beans.factory.xml.XmlBeanFactory;
 
     protected void setUp() throws Exception {
         try {
             super.setUp();
-            DatabaseHelper.createDatabase("");
+            DatabaseHelper.runScript("", "jdbc/CreateDS");
 
             XmlBeanFactory beanFactory = new XmlBeanFactory(new ClassPathResource("osworkflow-spring.xml"));
 

src/test/com/opensymphony/workflow/spi/jdbc/JDBCFunctionalWorkflowTestCase.java

 import com.opensymphony.workflow.config.Configuration;
 import com.opensymphony.workflow.config.DefaultConfiguration;
 import com.opensymphony.workflow.spi.AbstractFunctionalWorkflowTest;
-import com.opensymphony.workflow.spi.DatabaseHelper;
+import com.opensymphony.workflow.util.DatabaseHelper;
 
 import java.util.HashMap;
 
 
     protected void setUp() throws Exception {
         super.setUp();
-        DatabaseHelper.createDatabase(getClass().getResource("/scripts/jdbc/mckoi.sql"));
+        DatabaseHelper.runScript(getClass().getResource("/scripts/jdbc/mckoi.sql"), "jdbc/CreateDS");
 
         Configuration config = new DefaultConfiguration();
         config.load(getClass().getResource("/osworkflow-jdbc.xml"));
         workflow.setConfiguration(config);
     }
+
+    protected void tearDown() throws Exception {
+        DatabaseHelper.runScript(getClass().getResource("/scripts/jdbc/dropschema.sql"), "jdbc/DefaultDS");
+    }
 }

src/test/com/opensymphony/workflow/spi/ofbiz/OfbizFunctionalWorkflowTestCase.java

 import com.opensymphony.workflow.config.Configuration;
 import com.opensymphony.workflow.config.DefaultConfiguration;
 import com.opensymphony.workflow.spi.AbstractFunctionalWorkflowTest;
-import com.opensymphony.workflow.spi.DatabaseHelper;
+import com.opensymphony.workflow.util.DatabaseHelper;
 
 
 /**
 
     protected void setUp() throws Exception {
         //ofbiz creates its own tables
-        DatabaseHelper.createDatabase("");
+        DatabaseHelper.runScript("", "jdbc/CreateDS");
         super.setUp();
 
         Configuration config = new DefaultConfiguration();

src/test/com/opensymphony/workflow/util/DatabaseHelper.java

+/*
+ * Copyright (c) 2002-2003 by OpenSymphony
+ * All rights reserved.
+ */
+package com.opensymphony.workflow.util;
+
+import junit.framework.Assert;
+
+import net.sf.hibernate.SessionFactory;
+import net.sf.hibernate.cfg.Configuration;
+import net.sf.hibernate.tool.hbm2ddl.SchemaExport;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.io.*;
+
+import java.net.URL;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.Statement;
+
+import javax.naming.InitialContext;
+
+import javax.sql.DataSource;
+
+
+/**
+ * @author Eric Pugh
+ *
+ * This helper class populates a test database.
+ */
+public class DatabaseHelper {
+    //~ Static fields/initializers /////////////////////////////////////////////
+
+    private static final Log log = LogFactory.getLog(DatabaseHelper.class);
+
+    //~ Methods ////////////////////////////////////////////////////////////////
+
+    /**
+      * Use the default Hibernate *.hbm.xml files.  These build the primary keys
+      * based on an identity or sequence, whatever is native to the database.
+      * @throws Exception
+      */
+    public static SessionFactory createHibernateSessionFactory() throws Exception {
+        Configuration configuration = new Configuration();
+
+        //cfg.addClass(HibernateHistoryStep.class);
+        URL currentStep = DatabaseHelper.class.getResource("/com/opensymphony/workflow/spi/hibernate/HibernateCurrentStep.hbm.xml");
+        URL historyStep = DatabaseHelper.class.getResource("/com/opensymphony/workflow/spi/hibernate/HibernateHistoryStep.hbm.xml");
+        URL workflowEntry = DatabaseHelper.class.getResource("/com/opensymphony/workflow/spi/hibernate/HibernateWorkflowEntry.hbm.xml");
+        URL propertySet = DatabaseHelper.class.getResource("/com/opensymphony/module/propertyset/hibernate/PropertySetItemImpl.hbm.xml");
+        Assert.assertTrue(currentStep != null);
+        Assert.assertTrue(historyStep != null);
+        Assert.assertTrue(workflowEntry != null);
+        Assert.assertTrue(propertySet != null);
+        configuration.addURL(currentStep);
+        configuration.addURL(historyStep);
+        configuration.addURL(workflowEntry);
+        configuration.addURL(propertySet);
+
+        new SchemaExport(configuration).create(false, true);
+
+        return configuration.buildSessionFactory();
+    }
+
+    /**
+     * Create the database by loading a URL pointing at a SQL script.
+     */
+    public static void runScript(URL url, String dsLocation) {
+        Assert.assertNotNull("Database url is null", url);
+
+        try {
+            String sql = getDatabaseCreationScript(url);
+            runScript(sql, dsLocation);
+        } catch (IOException e) {
+            log.error(e.getMessage(), e);
+        }
+    }
+
+    /**
+     * Create a new database and initialize it with the specified sql script.
+     * @param sql the sql to execute
+     */
+    public static void runScript(String sql, String dsLocation) {
+        Connection connection;
+        Statement statement = null;
+        String sqlLine = null;
+
+        try {
+            InitialContext context = new InitialContext();
+            DataSource ds = (DataSource) context.lookup(dsLocation);
+            connection = ds.getConnection();
+            statement = connection.createStatement();
+
+            String[] sqls = StringUtils.split(sql, ";");
+
+            for (int i = 0; i < sqls.length; i++) {
+                sqlLine = StringUtils.stripToEmpty(sqls[i]);
+                sqlLine = StringUtils.replace(sqlLine, "\r", "");
+                sqlLine = StringUtils.replace(sqlLine, "\n", "");
+
+                //String s = sqls[i];
+                if ((sqlLine.length() > 0) && (sqlLine.charAt(0) != '#')) {
+                    try {
+                        statement.executeQuery(sqlLine);
+                    } catch (SQLException e) {
+                        if (sqlLine.toLowerCase().indexOf("drop") == -1) {
+                            log.error("Error executing " + sqlLine, e);
+                        }
+                    }
+                }
+            }
+        } catch (Exception e) {
+            log.error("Database creation error.  sqlLine:" + sqlLine, e);
+        } finally {
+            if (statement != null) {
+                try {
+                    statement.close();
+                } catch (Exception ex) {
+                    //not catch
+                }
+            }
+        }
+    }
+
+    private static String getDatabaseCreationScript(URL url) throws IOException {
+        InputStreamReader reader = new InputStreamReader(url.openStream());
+        StringBuffer sb = new StringBuffer(100);
+        int c = 0;
+
+        while (c > -1) {
+            c = reader.read();
+
+            if (c > -1) {
+                sb.append((char) c);
+            }
+        }
+
+        return sb.toString();
+    }
+}

src/test/com/opensymphony/workflow/util/PatchedMckoiDialect.java

+/*
+ * Copyright (c) 2002-2003 by OpenSymphony
+ * All rights reserved.
+ */
+package com.opensymphony.workflow.util;
+
+import net.sf.hibernate.dialect.MckoiDialect;
+
+
+/**
+ * @author Hani Suleiman
+ *         Date: Jul 11, 2005
+ *         Time: 1:52:46 AM
+ */
+public class PatchedMckoiDialect extends MckoiDialect {
+    //~ Methods ////////////////////////////////////////////////////////////////
+
+    public String getDropSequenceString(String string) {
+        return "drop table " + string + " if exists";
+    }
+}

src/test/hibernate.properties

 
 hibernate.query.imports net.sf.hibernate.test, net.sf.hibernate.eg
 
-hibernate.dialect net.sf.hibernate.dialect.MckoiDialect
+hibernate.dialect com.opensymphony.workflow.util.PatchedMckoiDialect
 
 #################
 ### Platforms ###

src/test/mckoi.conf

 #     30 = ALERTS
 #     40 = ERRORS
 
-debug_level=20
-query_logging=enabled
+debug_level=40
+query_logging=disabled

src/test/scripts/jdbc/dropschema.sql

+DROP TABLE IF EXISTS QRTZ_JOB_LISTENERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGER_LISTENERS;
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+
+DROP TABLE IF EXISTS OS_PROPERTYENTRY;
+DROP TABLE IF EXISTS OS_CURRENTSTEP_PREV;
+DROP TABLE IF EXISTS OS_HISTORYSTEP_PREV;
+DROP TABLE IF EXISTS OS_CURRENTSTEP;
+DROP TABLE IF EXISTS OS_HISTORYSTEP;
+DROP TABLE IF EXISTS OS_WFENTRY;
+
+DROP SEQUENCE SEQ_OS_WFENTRY;
+DROP SEQUENCE SEQ_OS_CURRENTSTEPS;