Documentation
Space shortcuts
Skip to end of metadata
Go to start of metadata

 On this page:


Microsoft SQL

Configuring a SQL Server Datasource in Apache Tomcat

Example

SQL Server Datasource
<Resource
    name="jdbc/myDS"
    auth="Container"
    type="javax.sql.DataSource"
    driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
    url="jdbc:sqlserver://<host>:1433;database=<database-name>"
    username="<database-user>"
    password="<password>"
    maxActive="20"
    maxIdle="10"
    maxWait="-1"
    validationQuery="select 1"
/>

Oracle

Configuring an Oracle Datasource in Apache Tomcat

Example

Oracle Datasource
<Resource
    name="jdbc/myDS"
    auth="Container"
    type="javax.sql.DataSource"
    driverClassName="oracle.jdbc.OracleDriver"
    url="jdbc:oracle:thin:@<host>:1521:mysid"
    username="<database-user>"
    password="<password>"
    connectionProperties="SetBigStringTryClob=true"
    maxActive="25"
    maxIdle="5"
    maxWait="10000"
    validationQuery="select 1 from DUAL"
/>

MySQL

Configuring a MySQL Datasource in Apache Tomcat

Example

MySQL Datasource
<Resource name="jdbc/myDS"
    auth="Container"
    type="javax.sql.DataSource"
    driverClassName="com.mysql.jdbc.Driver"
    url="jdbc:mysql://<host>/mydatabase?autoReconnect=true"
    username="<database-user>"
    password="<password>"
    maxActive="25"
    maxIdle="5"
    maxWait="10000"
    validationQuery="select 1"
/>

PostgreSQL

Configuring a PostgreSQL Datasource in Apache Tomcat

Example

PostgreSQL Datasource
<Resource name="jdbc/myDS"
    auth="Container"
    type="javax.sql.DataSource"
    username="confluence"
    password="confluence"
    maxActive="100"
    maxIdle="10"
    driverClassName="org.postgresql.Driver"
    url="jdbc:postgresql://localhost:5432/confluence"
    validationQuery="Select 1"
/>
  • No labels