Database Configuration

Jetspeed should work with any JDBC 2.0 complaint driver. The following databases have been tested:

  • DB2
  • Hypersonic SQL
  • MySQL
  • Oracle
  • Postgres
  • Sybase
  • (MS) SQL Server
  • Axion
  • Cloudscape
  • db2400
  • Interbase
  • SAP DB

Scripts for setting up the database are included with the source code distribution, under the src/sql/external folder. To change the database connection, you may will also need to have the source code since Jetspeed uses Torque. Torque generates Java bindings specific to the backend database, requiring that the source be rebuilt. The war file installation automatically configures Hypersonic SQL as the default database.

1. Torque Database Connection Properties

Edit project.properties (or your $HOME/build.properties), and set the database property to one of these values [db2,hypersonic,mysql,oracle,postgresql,mssql,sybase,axion,cloudscape,db2400,interbase,sapdb]

# Example:
database = mysql

Edit webapp/WEB-INF/conf/Torque.properties. Uncomment and change the following properties for your database:

### MySQL
### torque.dsfactory.default.connection.driver = org.gjt.mm.mysql.Driver
### torque.dsfactory.default.connection.url = jdbc:mysql://localhost:3306/jetspeed
### torque.dsfactory.default.connection.user =  root
### torque.dsfactory.default.connection.password = 
### Oracle
### torque.dsfactory.default.connection.driver = oracle.jdbc.driver.OracleDriver
### torque.dsfactory.default.connection.url = jdbc:oracle:thin:@nirvana:1521:bluesun3
### torque.dsfactory.default.connection.user =  jetspeed
### torque.dsfactory.default.connection.password = jetspeed
### Microsoft SQL
### torque.dsfactory.default.connection.driver = net.avenir.jdbc3.Driver
### torque.dsfactory.default.connection.url = jdbc: AvenirDriver://localhost:1433/jetspeed
### torque.dsfactory.default.connection.user =  jetspeed
### torque.dsfactory.default.connection.password = jetspeed

2. Download or Build Torque OM Bindings JAR

Torque, unfortunately, requires that you recompile some of your source, or bindings file, to run with a particular database. For example, Oracle uses sequences, and other databases do not. Thus you have to place in specific bindings jars for each database. You can download the prebuilt drivers from here: Torque Bindings Download and go to the directory for your particular database. Place the downloaded jetspeed-torque-om-1.6.jar for your database and in your jetspeed WEB-INF/lib directory in your deployment or WAR distribution.

2a. Build Torque OM Bindings JAR

Optionally, you want to build the Torque OM binding jar from source:

cd torque-om
vi project.properties
# EDIT property: torque.database
# SAVE
maven 
# this creates the jetspeed-torque-om-1.6.jar in the target directory.

3. Run Database Scripts

Run the database 2 turbine- and populate- scripts for your particular database found in src/sql/external

4. Fusion Database Setup

If using Fusion, follow the Fusion Database instructions.