Skip to content

Instantly share code, notes, and snippets.

@dahoba
Created November 27, 2016 14:44
Show Gist options
  • Save dahoba/cde0d9de595eb9372d4ca6fe2a2e7cb9 to your computer and use it in GitHub Desktop.
Save dahoba/cde0d9de595eb9372d4ca6fe2a2e7cb9 to your computer and use it in GitHub Desktop.
Tomcat Oracle JNDI datasource sample
<?xml version='1.0' encoding='utf-8'?>
<!-- The contents of this file will be loaded for each web application -->
<!-- this file placed under TOMCAT6_HOME/conf/Catalina/localhost/ -->
<Context path="/FOO" reloadable="false" docBase="FOO" >
<Resource auth="Container" name="jdbc/FOODB"
type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver"
password="foobar" maxIdle="8" maxWait="15000" maxActive="16"
removeAbandoned="true" validationQuery="select 1 from dual"
username="foobar" url="jdbc:oracle:thin:@//172.16.0.186:1521/foodb" />
</Context>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment