Helma Logo
main list history

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

1<small><b>Description</b></small>
4To 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:
6<tt>sources = <i>dataSourceName</i></tt>  dataSourceName.url
7    dataSourceName.driver
8    dataSourceName.user
9    dataSourceName.password
8In consequence the following properties of the data source(s) must be set:**Example**
10<tt><i>dataSourceName</i>    mysql.urlurl = jdbc:mysql://localhost/dbname
11<i>dataSourceName</i>    mySql.driverdriver = com.mysql.jdbc.Driver
12<i>dataSourceName</i>    mySql.useruser = username
13<i>dataSourceName</i>    mySql.password</tt>password = secretPassword
12<small><b>Example</b></small>    oracle.url = jdbc:oracle://db.domain.com/oracle
13<tt>sources = mySqlDB, oracleDB, hsqlDB oracle.driver = oracle.jdbc.driver.OracleDriver
14    oracle.user = username2
15    oracle.password = secretPassword2
14mySqlDB    hsql.url = jdbc:mysql://db.domain.com/mysqljdbc:hsqldb:dbData
15mySqlDB    hsql.driver driver= org.gjthsqldb.mm.mysql.DriverjdbcDriver
16mySqlDB    hsql.user user= usernamesa
17mySqlDB    hsql.password password=
16oracleDB.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.
17oracleDB.driver = oracle.jdbc.driver.OracleDriver
18oracleDB.user = username2
19oracleDB.password = secretPassword2
18hsqlDB    mysql.url = jdbc:hsqldb:dbDatajdbc:mysql://db.domain.com/mysql
19hsqlDB    mysql.driverdriver =org com.hsqldbmysql.jdbcDriverjdbc.Driver
20hsqlDB    mysql.useruser =sa username
21hsqlDB    mysql.passwordpassword =</tt> secretPassword
22    mysql.zeroDateTimeBehavior = convertToNull
23    mySql.useUnicode=true
24    mySql.characterEncoding=UTF-8
20Additional properties are ignored by Helma but forwarded to the relational database as connection properties.
21
22<small><b>Example</b> (see http://bugs.mysql.com/bug.php?id=7369)</small>
23<tt>sources = mySqlDB
24
25mySqlDB.url = jdbc:mysql://db.domain.com/mysql
26mySqlDB.driver = org.gjt.mm.mysql.Driver
27mySqlDB.user = username
28mySqlDB.password = secretPassword
29mySqlDB.zeroDateTimeBehavior = convertToNull</tt>
30
31
32<small><b>Note:</b></small>
33It's possible to set further configuration values in the db.properties as for example:
34
35<tt>mySqlDB.useUnicode=true
36mySqlDB.characterEncoding=UTF-8</tt>
37
22* <a href="http://grazia.helma.org/pipermail/helma-user/2004-August/002723.html">  example >example on the mailing list</a>
23* <a href="http://help.antville.org/stories/811460/#816656">about charset handling with antville</a>
24* <a href="http://bugs.mysql.com/bug.php?id=7369">Zero date problem in MySQL</a>

Version 1 by zumbrunn on 18. February 2009, 21:33

1<small><b>Description</b></small>
2This 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.
3
4To define data sources, the property <tt>sources</tt> is assigned a comma-separated list of names (certainly, the list can contain only one element):
5
6<tt>sources = <i>dataSourceName</i></tt>
7
8In consequence the following properties of the data source(s) must be set:
9
10<tt><i>dataSourceName</i>.url
11<i>dataSourceName</i>.driver
12<i>dataSourceName</i>.user
13<i>dataSourceName</i>.password</tt>
14
15<small><b>Example</b></small>
16<tt>sources = mySqlDB, oracleDB, hsqlDB
17
18mySqlDB.url = jdbc:mysql://db.domain.com/mysql
19mySqlDB.driver = org.gjt.mm.mysql.Driver
20mySqlDB.user = username
21mySqlDB.password = secretPassword
22
23oracleDB.url = jdbc:oracle://db.domain.com/oracle
24oracleDB.driver = oracle.jdbc.driver.OracleDriver
25oracleDB.user = username2
26oracleDB.password = secretPassword2
27
28hsqlDB.url = jdbc:hsqldb:dbData
29hsqlDB.driver=org.hsqldb.jdbcDriver
30hsqlDB.user=sa
31hsqlDB.password=</tt>
32
33Additional properties are ignored by Helma but forwarded to the relational database as connection properties.
34
35<small><b>Example</b> (see http://bugs.mysql.com/bug.php?id=7369)</small>
36<tt>sources = mySqlDB
37
38mySqlDB.url = jdbc:mysql://db.domain.com/mysql
39mySqlDB.driver = org.gjt.mm.mysql.Driver
40mySqlDB.user = username
41mySqlDB.password = secretPassword
42mySqlDB.zeroDateTimeBehavior = convertToNull</tt>
43
44
45<small><b>Note:</b></small>
46It's possible to set further configuration values in the db.properties as for example:
47
48<tt>mySqlDB.useUnicode=true
49mySqlDB.characterEncoding=UTF-8</tt>
50
51see also:
52<a href="http://grazia.helma.org/pipermail/helma-user/2004-August/002723.html">  example on the mailing list</a>
53<a href="http://help.antville.org/stories/811460/#816656">about charset handling with antville</a>