MSSQL

Configuring a SQL Server Datasource in Apache Tomcat

Example

SQL Server Datasource
<Resource
    name="jdbc/myDS"
    auth="Container"
    type="javax.sql.DataSource"
    driverClassName="net.sourceforge.jtds.jdbc.Driver"
    url="jdbc:jtds:sqlserver://mysqlserver:1433/mydatabase"
    username="username"
    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:@www.some_server.com:1521:mysid"
    username="username"
    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://localhost/mydatabase?autoReconnect=true"
    username="username"
    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"
/>

Labels (0)

  • No labels

Comments  (0)

Attachments  (0)

Add Attachment
No files shared here yet.

Page viewed 1,208 times