[jboss-user] [JBoss jBPM] - Re: change database

estaub do-not-reply at jboss.com
Tue Jan 23 15:08:41 EST 2007


I just switched to Oracle today, so this is all pretty fresh in my head (unlike most of the rotten stuff in there).

First, if you haven't already, see http://docs.jboss.org/jbpm/v3/userguide/persistence.html#changingthejbpmdb and the surrounding context.  

So you need to change the jdbc connection info in the hibernate configuration file.  In the starter kit, it's called hibernate.cfg.xml.
The lines of interest are:
    <!-- jdbc connection properties -->
  |     <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
  |     <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
  |     <property name="hibernate.connection.url">jdbc:hsqldb:mem:.;sql.enforce_strict_size=true</property>
  |     <property name="hibernate.connection.username">sa</property>
  |     <property name="hibernate.connection.password"></property>

I started by getting the HelloWorldDbTest in the tutorials to work.
If you do this, note that it creates the needed schema in the database in setup() and deletes it all at teardown().  This had me confused for a while - I had set up the schema by script first, and after I ran the test - poof - all my tables had disappeared!

If you want scripts for creating the schema, they're in the starter's kit under jbpm-db/build for most DBs.  For Oracle, you have to run the target in the jbpm-db antfile yourself - it's called "oracle.scripts" if I remember right.  This will create them under the "build" subtree.

-Ed Staub

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005470#4005470

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4005470



More information about the jboss-user mailing list