Third-party Database Configuration
Resin 3.1

Documentation
Examples
Changes

Overview
Installation
Configuration
Quercus
SOA/IoC
JSP
Servlets and Filters
Admin (JMX)
EJB
Amber
Security
Performance
Hessian
XML and XSLT
Third-party
Troubleshooting/FAQ

IDE's
Scottit
Groovy
SwiftMQ
OpenJMS
Hibernate
Database
Hibernate
Third-party
Troubleshooting/FAQ

A list of third party databases and example driver configurations.

MySQL Connector/J

MySQL Connector/J JDBC configuration
<database>
  <jndi-name>jdbc/mysql</jndi-name>
  <driver>
    <type>com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource</type>
    <url>jdbc:mysql://localhost:3306/dbname</url>
    <user>username</user>
    <password>password</password>
  </driver>
  ...
</database>

Oracle

Oracle JDBC configuration
<database>
  <jndi-name>jdbc/oracle</jndi-name>
  <driver>
    <type>oracle.jdbc.pool.OracleConnectionPoolDataSource</type>
    <url>jdbc:oracle:thin:@localhost:1521:dbname</url>
    <user>username</user>
    <password>password</password>
  </driver>
  ...
</database>

Note, the XADataSource is only needed for distributed transactions. If your transactions only include the single data source, the OracleConnectionPoolDataSource will be more efficient.

Oracle XADataSource JDBC configuration
<database>
  <jndi-name>jdbc/oracle-xa</jndi-name>
  <xa>true</xa>
  <driver>
    <type>oracle.jdbc.xa.client.OracleXADataSource</type>
    <url>jdbc:oracle:thin:@localhost:1521:dbname</url>
    <user>username</user>
    <password>password</password>
  </driver>
  ...
</database>

Informix

Informix JDBC configuration
<database>
  <jndi-name>jdbc/informix</jndi-name>
  <driver>
    <type>com.informix.jdbcx.IfxConnectionPoolDataSource</type>
    <url>jdbc:informix-sqli://123.45.67.89:1533/dbname</url>
    <init-param param-name="INFORMIXSERVER" param-value="myserver"/>
    <user>username</user>
    <password>password</password>
  </driver>
  ...
</database>
Informix XADataSource JDBC configuration
<database>
  <jndi-name>jdbc/informix-xa</jndi-name>
  <xa>true</xa>
  <driver type="com.informix.jdbcx.IfxXADataSource">
    <url>jdbc:informix-sqli://123.45.67.89:1533/dbname</url>
    <init-param param-name="INFORMIXSERVER" param-value="myserver"/>
    <user>username</user>
    <password>password</password>
  </driver>
  ...
</database>

SQL Server

<database>
  <jndi-name>jdbc/sqlserver</jndi-name>
  <driver type="com.microsoft.jdbcx.sqlserver.SQLServerDataSource">
    <serverName>csdevsqla01.office.foo</serverName>
    <portNumber>1433</portNumber>
    <databaseName>Reports</databaseName>
    <user>XXX</user>
    <password>YYY</password>
    <selectMethod>cursor</selectMethod>
  </driver>
  <xa>true</xa>
</database>

DB2

Contributions welcome!

Interbase

Contributions welcome!

PostgreSQL

<database>
  <jndi-name>jdbc/name</jndi-name>
  <driver>
    <type>org.postgresql.Driver</type>
    <url>jdbc:postgresql://127.0.0.1:5432/dbname</url>
    <user>username</user>
    <password>password</password>
  </driver>
  ...
</database>

hsqldb

"hsqldb is a relational database engine written in Java. It offers a small (less than 160k), fast database engine which offers both in memory and disk based tables."

Contributions welcome!


Hibernate
Third-party
Troubleshooting/FAQ
Copyright © 1998-2006 Caucho Technology, Inc. All rights reserved.
Resin ® is a registered trademark, and Quercustm, Ambertm, and Hessiantm are trademarks of Caucho Technology.