Skip to content

Instantly share code, notes, and snippets.

@danieltnaves
Created July 5, 2016 12:47
Show Gist options
  • Save danieltnaves/b3f5e4233bb4a004be8539cf79a9adce to your computer and use it in GitHub Desktop.
Save danieltnaves/b3f5e4233bb4a004be8539cf79a9adce to your computer and use it in GitHub Desktop.
Settting up Tomcat 8 Data Source (Oracle)
<!-- 1) Add "Resource" entry in conf/context.xml -->
<Resource auth="Container"
driverClassName="oracle.jdbc.driver.OracleDriver"
maxActive="100" maxIdle="30" maxWait="-1"
name="jdbc/OracleDS" type="javax.sql.DataSource"
url="jdbc:oracle:thin:@host:1521:SIDNAME"
username="user" password="123" />
<!-- 2) Add "resource-ref" entry in conf/web.xml -->
<resource-ref>
<description>Oracle Datasource</description>
<res-ref-name>jdbc/OracleDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment