Helma Logo
main list history
previous version  overview  next version

Version 2 by hannes on 22. September 2009, 00:01

This file is located in Helma's installation directory. It contains a list of data sources and data source properties setting up the basic connection between Helma and relational databases.

To define a data sourcessource, add its properties to the property <tt>sources</tt> is assigned a comma-separated list of names (certainly, `db.properties` file prefixed with the list can contain only one element):data source name:

<tt>sources = <i>dataSourceName</i></tt>  dataSourceName.url

In consequence the following properties of the data source(s) must be set:**Example**

<tt><i>dataSourceName</i>    mysql.urlurl = jdbc:mysql://localhost/dbname
<i>dataSourceName</i>    mySql.driverdriver = com.mysql.jdbc.Driver
<i>dataSourceName</i>    mySql.useruser = username
<i>dataSourceName</i>    mySql.password</tt>password = secretPassword

<small><b>Example</b></small>    oracle.url = jdbc:oracle://db.domain.com/oracle
<tt>sources = mySqlDB, oracleDB, hsqlDB oracle.driver = oracle.jdbc.driver.OracleDriver
    oracle.user = username2
    oracle.password = secretPassword2

mySqlDB    hsql.url = jdbc:mysql://db.domain.com/mysqljdbc:hsqldb:dbData
mySqlDB    hsql.driver driver= org.gjthsqldb.mm.mysql.DriverjdbcDriver
mySqlDB    hsql.user user= usernamesa
mySqlDB    hsql.password password=

oracleDB.url =Additional properties are ignored by Helma but forwarded to the relational database as connection properties, jdbc:oracle://dbso you may set properties specific to the databse product you're using.
oracleDB.driver = oracle.jdbc.driver.OracleDriver
oracleDB.user = username2
oracleDB.password = secretPassword2

hsqlDB    mysql.url = jdbc:hsqldb:dbDatajdbc:mysql://db.domain.com/mysql
hsqlDB    mysql.driverdriver =org com.hsqldbmysql.jdbcDriverjdbc.Driver
hsqlDB    mysql.useruser =sa username
hsqlDB    mysql.passwordpassword =</tt> secretPassword
    mysql.zeroDateTimeBehavior = convertToNull

Additional properties are ignored by Helma but forwarded to the relational database as connection properties.

<small><b>Example</b> (see http://bugs.mysql.com/bug.php?id=7369)</small>
<tt>sources = mySqlDB

mySqlDB.url = jdbc:mysql://db.domain.com/mysql
mySqlDB.driver = org.gjt.mm.mysql.Driver
mySqlDB.user = username
mySqlDB.password = secretPassword
mySqlDB.zeroDateTimeBehavior = convertToNull</tt>

It's possible to set further configuration values in the db.properties as for example:


see also:
* <a href="http://grazia.helma.org/pipermail/helma-user/2004-August/002723.html">  example >example on the mailing list</a>
* <a href="http://help.antville.org/stories/811460/#816656">about charset handling with antville</a>
* <a href="http://bugs.mysql.com/bug.php?id=7369">Zero date problem in MySQL</a>