1   /*
2    * $Id: AbstractJbpmTestCase.java 9493 2007-10-31 02:03:22Z dirk.olmes $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.providers.bpm.jbpm;
12  
13  import org.mule.providers.bpm.tests.AbstractBpmTestCase;
14  import org.mule.providers.jdbc.util.MuleDerbyUtils;
15  
16  public abstract class AbstractJbpmTestCase extends AbstractBpmTestCase
17  {
18      private static boolean derbySetupDone = false;
19  
20      protected void suitePreSetUp() throws Exception
21      {
22          if (!derbySetupDone)
23          {
24              String dbName = MuleDerbyUtils.loadDatabaseName("derby.properties", "database.name");
25              System.getProperties().put("hibernate.dbURL", "jdbc:derby:" + dbName + ";sql.enforce_strict_size=true");
26              
27              MuleDerbyUtils.defaultDerbyCleanAndInit("derby.properties", "database.name");
28              derbySetupDone = true;
29          }
30  
31          super.suitePreSetUp();
32      }
33  
34  }