[jboss-user] [JBoss jBPM] - how to programatically set jdbc connection string for hsqldb

tjcroteau do-not-reply at jboss.com
Thu Jul 12 23:54:20 EDT 2007


Hi,

I am very new to jbpm and trying to programatically set the hsdqldb connection string instead of using the defaults set in hibernate.cfg.xml.  All of the defaults in the hibernate config file are acceptable with the exception of the jdbcconnection string (I need to construct the location of the database at runtime).

I'm using the below code where connection is a javax.sql.Connection that has been populated with the jdbc connection string.

  | JbpmContext jbpmContext = Jbpmconfiguration.getInstance().createJbpmContext();
  | jbpmContext.setConnection(connection);
  | 

I thought that interjecting the setConnection into the context would override the jdbc connection string that is in the hibernate.cfg.xml file (based upon the jbpm chapter on persistence).  However, the jbpm instance that is starting up is still using the jdbc connect string from the config file instead of the one that is passed into setConnection.

I would appreciate any help or thoughts.

Tammy

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

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



More information about the jboss-user mailing list