Default Database

The default database distributed with Fusion is the Hypersonic SQL Java Database (HSQL). HSQL runs in its own process outside of Jetspeed-2. It is not a production-ready database, however it allows you to get up and running quickly. To move on to a more robust database, follow the instructions in the next section.

MySQL

To run with My SQL, add the following properties to your $HOME/build.properties:


# -------------------------------------------------------------------------
# configure MySQL Test DB (only needed when running unit tests)
# -------------------------------------------------------------------------
org.apache.jetspeed.fusion.test.database.default.name=mysql
org.apache.jetspeed.fusion.test.database.url = jdbc:mysql://j2-server/j2test
org.apache.jetspeed.fusion.test.database.driver = com.mysql.jdbc.Driver
org.apache.jetspeed.fusion.test.database.user = jetspeed2
org.apache.jetspeed.fusion.test.database.password = whatever
# -------------------------------------------------------------------------
# configure MySQL Production DB
# -------------------------------------------------------------------------
org.apache.jetspeed.fusion.production.database.default.name=mysql
org.apache.jetspeed.fusion.production.database.url = jdbc:mysql://j2-server/j2
org.apache.jetspeed.fusion.production.database.driver = com.mysql.jdbc.Driver
org.apache.jetspeed.fusion.production.database.user = jetspeed2
org.apache.jetspeed.fusion.production.database.password = whatever
# -------------------------------------------------------------------------

In the example above, you will need to have a MySQL server running on a host named 'j2-server' with a database called 'j2' for production.

If you are going to run the unit tests you will also need an additional test database called 'j2test'.

A user named 'jetspeed2' should be granted access to both the 'j2' and 'j2test' databases.

Known Issues

None

Oracle

To run with Oracle, add the following properties to your $HOME/build.properties:


# -------------------------------------------------------------------------
# configure Oracle Test DB (only needed when running unit tests)
# -------------------------------------------------------------------------
# org.apache.jetspeed.fusion.test.database.default.name=oracle
# org.apache.jetspeed.fusion.test.database.ojb.platform=oracle9i
# org.apache.jetspeed.fusion.test.database.url = jdbc:oracle:thin:@j2-sever:1521:j2db
# org.apache.jetspeed.fusion.test.database.driver = oracle.jdbc.driver.OracleDriver
# org.apache.jetspeed.fusion.test.database.user = j2test
# org.apache.jetspeed.fusion.test.database.password = whatever
# -------------------------------------------------------------------------
# configure Oracle Production DB
# -------------------------------------------------------------------------
# org.apache.jetspeed.fusion.production.database.default.name=oracle
# org.apache.jetspeed.fusion.production.database.ojb.platform=oracle9i
# org.apache.jetspeed.fusion.production.database.url = jdbc:oracle:thin:@j2-server:1521:j2db
# org.apache.jetspeed.fusion.production.database.driver = oracle.jdbc.driver.OracleDriver
# org.apache.jetspeed.fusion.production.database.user = j2
# org.apache.jetspeed.fusion.production.database.password = whatever
# -------------------------------------------------------------------------

In the example above, you will need to have a Oracle server running on a host named 'j2-server' and have an Oracle database SID named 'j2db' installed on that server. Also, you will need a database user (schema) called 'j2' for production usage.

If you are going to run the unit tests you will need an additional user called 'j2test'.

Known Issues

Only for the first time you create the database for Oracle, there is an issue with the drop statements. To get around this problem, set your properties as above in your $HOME/build.properties, and then run these commands:


maven db.scripts.gen
maven dropdrops
maven db.create.test (only when running unit tests)
maven db.create.production

Drivers

JDBC drivers are configured to work with the Maven build by adding your specified JDBC driver jars to the Maven class path. Specify the jars with the org.apache.jetspeed.test.jdbc.drivers.path and org.apache.jetspeed.fusion.production.jdbc.drivers.path properties in your $HOME/build.properties.

NOTE: The Hypersonic JDBC driver is distributed with Jetspeed and require no configuration.


# My SQL Driver Path Example, test and production
org.apache.jetspeed.fusion.test.jdbc.drivers.path=/Portal/lib/MySQL/mysql-connector-java-3.0.8-stable-bin.jar
org.apache.jetspeed.fusion.production.jdbc.drivers.path=/Portal/lib/MySQL/mysql-connector-java-3.0.8-stable-bin.jar

# Oracle 9i Driver Path Example, test and production
org.apache.jetspeed.fusion.test.jdbc.drivers.path=/Portal/lib/oracle/ojdbc14.jar;/Portal/lib/oracle/nls_charset12.jar
org.apache.jetspeed.fusion.production.jdbc.drivers.path=/Portal/lib/oracle/ojdbc14.jar;/Portal/lib/oracle/nls_charset12.jar

# Oracle 8i Driver Path Example, test and production
org.apache.jetspeed.fusion.test.jdbc.drivers.path=/Portal/lib/oracle/classes12.jar;
org.apache.jetspeed.fusion.production.jdbc.drivers.path=/Portal/lib/oracle/classes12.jar;

Distributing Drivers

When Jetspeed is deployed to an application server using the maven deploy target, only the Hypersonic JDBC driver is copied into the web application. To distribute a specific driver (i.e. Oracle, MySQL), you will need to copy the driver into the application server's common class path for shared code.

Application ServerProcedure
Tomcat 5 and 5.5 copy driver(s) to ${TOMCAT_HOME}/common/endorsed/