Database Configuration
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 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.
Properties
The most important settings are described below. For a full description of all options, see 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 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.
MySQL
database=mysql driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/emptyproject username=sol_user password=sol_user
Oracle
database=oracle driverClassName=oracle.jdbc.OracleDriver url=jdbc:oracle:thin:@localhost:1521/XE username=sol_user password=sol_user
Sybase SQL Anywhere
database=sybase_asa driverClassName=com.sybase.jdbc4.jdbc.SybDriver url=jdbc:sybase:Tds:localhost:2640/emptyproject username=sol_user password=sol_user
Security Issues
Since the database password is kept in plaintext in db.properties file, it should be properly secured.
SOLoist doesn't offer any kind of encryption of the password field.