Differences
This shows you the differences between two versions of the page.
databaseconfiguration [2011/06/29 15:43] milorad.poptosic [Oracle] |
databaseconfiguration [2011/06/30 15:35] (current) milorad.poptosic |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Database Configuration ====== | ====== Database Configuration ====== | ||
- | The database to be used in a SOLoist application is configured by way of a db.properties file. The exact filename of the db.properties file and the RDBMS need to be set with an rdbms tag in [[soloistconfiguration|soloist-config.xml]]. | + | The database to be used in a SOLoist application is configured by way of a db.properties file. |
- | Currently, SOLoist supports Oracle, Sybase SQL Anywhere, MySQL databases, but any other RDBMS that supports the usual relational paradigm, SQL (Structured Query Language), and ODBC can be easily supported, too. In the Empty Project, which can be downloaded from [[http://www.soloist4uml.com/downloads|SOLoist Website Download Section]] there are three db.properties files for each supported database. | + | Currently, SOLoist supports Oracle, Sybase SQL Anywhere, MySQL databases, but any other RDBMS that supports the usual relational paradigm, SQL (Structured Query Language), and ODBC can be easily supported, too. In the Empty Project, which can be downloaded from [[http://www.soloist4uml.com/downloads|SOLoist Website Download Section]] there are three db.properties files for each supported database. You will have to rename appropriate properties file to db.properties depending on which RDBMS you will use. |
Before you start configuring database for a SOLoist application, you need to create a database schema, and add a user with appropriate privileges for that schema. Be sure to memorize or write down the schema name, user name and password, beacuse you will need to enter them into the db.properties file. | Before you start configuring database for a SOLoist application, you need to create a database schema, and add a user with appropriate privileges for that schema. Be sure to memorize or write down the schema name, user name and password, beacuse you will need to enter them into the db.properties file. | ||
+ | |||
+ | ===== Properties ===== | ||
+ | The most important settings are described below. For a full description of all options, see [[http://commons.apache.org/dbcp/configuration.html|DBCP Configuration]]. | ||
+ | ==== database ==== | ||
+ | This property specifies the RDBMS to be used. It can be one of the following: mysql, oracle, sybase_asa. | ||
+ | ==== url ==== | ||
+ | This property contains the fully qualified name of the database driver to be used. | ||
+ | ==== username ==== | ||
+ | This property specifies the database username to be used when accessing the database. | ||
+ | ==== password ==== | ||
+ | This property specifies the password for the user to be used when accessing the database. | ||
+ | ==== defaultAutoCommit ==== | ||
+ | This property specifies whether each update should be made permanent immediately, or when the commit happens. | ||
+ | It is highly recommended to set this property to false, as otherwise SOLoist transactions will not work. | ||
+ | Find out [[http://download.oracle.com/javase/tutorial/jdbc/basics/transactions.html#disable_auto_commit|more about the auto-commit mode]]. | ||
+ | |||
In sections which follow, it is shown how to configure the most important settings for the three supported databases. | In sections which follow, it is shown how to configure the most important settings for the three supported databases. | ||
Line 27: | Line 43: | ||
===== Sybase SQL Anywhere ===== | ===== Sybase SQL Anywhere ===== | ||
<file> | <file> | ||
- | rdbms=sybase_asa | + | database=sybase_asa |
driverClassName=com.sybase.jdbc4.jdbc.SybDriver | driverClassName=com.sybase.jdbc4.jdbc.SybDriver | ||
url=jdbc:sybase:Tds:localhost:2640/emptyproject | url=jdbc:sybase:Tds:localhost:2640/emptyproject | ||
Line 33: | Line 49: | ||
password=sol_user | password=sol_user | ||
</file> | </file> | ||
- | |||
- | ===== Additional Options ===== | ||
===== Security Issues ===== | ===== Security Issues ===== |