2 Replies Latest reply on Jul 18, 2007 7:02 PM by Ronald van Kuijk

    how to programatically set jdbc connection string for hsqldb

    Tammy Croteau Newbie

      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