HDTutorial
EN

Playback starts YouTube’s embedded player (privacy-enhanced mode).

112 Create JDBC Connection Pool for Oracle in Tomcat Server| Advance Java Servlet Tutorial

5,844 views November 12, 2019 17:54

Watch on YouTube
Channeltech fort

Description from the creator

Procedure to #create #JDBC #Connection #Pool for #Oracle in #Tomcat #Server: Advance Java #Servlet #Tutorial
Step 1) Download Apache #tomcat-jdbc-1.1.0.1-bin.zip file from #www.apache.org website & gather following jar files.

Step 2) Add (copy and paste) follwing jar files to lib directory of tomcat
C:\Program Files\Apache Software Foundation\Tomcat 9.0\lib

1) #tomcat-jdbc.jar //available in downloaded zip file
2) #tomcat-juli.jar //available in downloaded zip file
3) #ojdbc14.jar //download externally

Step 3) Add following code under context.xml file in context tag

C:\Program Files\Apache Software Foundation\Tomcat 9.0\conf\context.xml

Resource name="OraTomPool" auth="Container" type="javax.sql.DataSource" factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" driverClassName="oracle.jdbc.driver.OracleDriver" username="scott" password="boss" initialSize="4" maxActive="20" maxIdle="10" minIdle="5" maxWait="100" validationQuery="select sysdate from dual"/


JDBC Driver details to create Connection object:
driverClassName="oracle.jdbc.driver.OracleDriver" username="scott" password="boss"

Pool Parameters:
initialSize="4" maxActive="20" maxIdle="10" minIdle="5" maxWait="100"

Step 4) if server is in running mode, then need to restart the Tomcat server to reflect Connection pool changes.

Procedure to use the above created #Tomcat #server managed #Connection #pool in PoolApp Web application:

About this tutorial

tech fort published this 17:54 video tutorial on November 12, 2019. It has been watched 5,844 times on YouTube.

Channel
tech fort
Duration
17:54
Published
November 12, 2019
Views
5,844
Likes
72

Share

This tutorial in other languages