Skip to content

Instantly share code, notes, and snippets.

@danieltnaves
Created July 5, 2016 12:47
Show Gist options
  • Select an option

  • Save danieltnaves/b3f5e4233bb4a004be8539cf79a9adce to your computer and use it in GitHub Desktop.

Select an option

Save danieltnaves/b3f5e4233bb4a004be8539cf79a9adce to your computer and use it in GitHub Desktop.

Revisions

  1. danieltnaves created this gist Jul 5, 2016.
    16 changes: 16 additions & 0 deletions steps-tomcat8-datasource.xml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    <!-- 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>