SlideShare a Scribd company logo
A REVIEW OF CONNECTION POOLING IMPLEMENTATION IN ICA TOOL
Mtech(IT),Utkal University,Odisha
ABSTRACT
Connection Pooling is a concept of managing DB connections in the server side to ensure the
maximum no. of connections cannot breach with the configured no. of connections. And it
manages the idle connections (those are not actively in used) in the pool ready to reuse. In the
existing ICA Tool system, when user can access that no. interfaces (which was defined in a
configuration file) at a time and after that if they want to access a new interface, it will not allow
end user to do anything. And at last user needs to restart tomcat server to release/reset the
connections. With the implementation of connection pooling, we can overcome existing problem.
Keywords:Connection Pooling, Database connection,JDBC ,Tomcat server
1. PURPOSE
Connection Pooling is a concept of
managing DB connections in the server
side to ensure the maximum no. of
connections cannot breach with the
configured no. of connections. And it
manages the idle connections (those are
not actively in used) in the pool ready to
reuse. In the existing ICA Tool system,
when user can access that no. interfaces
(which was defined in a configuration
file) at a time and after that if they want
to access a new interface, it will not
allow end user to do anything. And at
last user needs to restart tomcat server to
release/reset the connections. With the
implementation of connection pooling,
we can overcome existing problem.
2. SCOPE
Using connection pooling in ICA Tool,
we can manage the database connections
robustly, and as per connection pooling
it ensures the no of connections are not
breaching the defined nos. So server
should run smoothly and no need to
restart it and more to that user can use
more no of interfaces.
We had some analysis over the type of
connection pooling to use in various
applications. Generally we took (a)
Commons DBCP (b) C3P0 and (c)
Oracle UCP into consideration.
3. FEATURES
We went over internet to find the best
one that will suit for our multi-threaded
applications.
Internaltional Journal of Advanced Research in Computer Sceience and Applications
Vol.1, Issue 5, November 2013
ISSN: 2321-872X-Online 2321-8932- Print
www.ijarcsa.org admin@ijarcsa.org
w
w
w
.ijarcsa.org
22
Nishanta Ranjan Nanda Prav at Sutar
Senior System Engineer, IBM India Pvt L imited, Kolkata
1
2
1 2
However, according to the sources, we found that
C3P0 DBCP
It is better for multithreaded
environment.
It is better suited to single-
threaded applications with high
load
C3p0 doesn’t actually make a
connection available in the pool when
it is checked- in. Instead the Helper
Threads will detect these and do the
work to get them back.
This is missing in case of DBCP.
It robustly handles DB disconnects and
transparent reconnects on resume.
It never recovered connections if
the link was taken out from it.
 Regarding Oracle UCP, we did not
find much comparison. But some sites
suggested that Oracle UCP does not
fully support JDK 6/ojdbc6.jar. We are
not considering this as it can create
problem when we upgrade Java versions
in future.
4. IMPLEMENTATION
From this analysis, we decided to use
C3P0 Connection pooling mechanism in
our applications. We did a POC to
observe the behavior of number of
connections to the database and it seems
like the number of connections do not
exceed over the maximum number of
connections mentioned. Each
connection is properly allocated and de-
allocated by the connection pooling
mechanism.
The dependent jar files are:
1) mchange-commons-java-0.2.3.4.jar
2) c3p0-0.9.2.1.jar
The sample Connection Pooling class is
attached herewith.
5. OUTPUT
After implementing connection pooling
in ICA Tool, It overcomes below
existing limitations of ICA Tool.
(a) In the existing application, the
connections were not reused properly.
But with the new implementation, the
same is reused as and when required and
never exceeds the MAX connection i.e.
6 mentioned in the configuration file.
The connection opens and releases so
efficiently.
(b) The existing application never allows
the user to login when it exceeds the
maximum connection. From the testing
it is found that user can open 10 to 12
windows (not more that that) but with
the new implementation, it allows the
user to open more number of windows.
We have tested opening around 25
refreshable windows. Nevertheless, the
idle connection still exists in the pool.
This ensures that we can further open
more number of windows.
We could open 25 refreshable windows.
Below is the screen shot.
Internaltional Journal of Advanced Research in Computer Sceience and Applications
Vol.1, Issue 5, November 2013
ISSN: 2321-872X-Online 2321-8932- Print
www.ijarcsa.org admin@ijarcsa.org
w
w
w
.ijarcsa.org
23
[Figure Showing 25 refreshable windows]
(c) In the existing application, the
connection object was made instance
specific. For this reason, the connection
object was not being released properly.
With the new implementation, this fix is
in place. The connection object releases
so efficiently.
Below is the log detail.
[Figure showing log details]
(d) The existing application encounters
some sort of problems. When all the
connections are in use in the pool and
the next request comes, it throws an
error “Maximum Number of
Connection Reached”. This is not the
general behavior of Connection pooling
Mechanism. With the new
implementation, when all the
connections are in use in the pool and
any further request comes, the request
waits till it gets any released connection.
Internaltional Journal of Advanced Research in Computer Sceience and Applications
Vol.1, Issue 5, November 2013
ISSN: 2321-872X-Online 2321-8932- Print
www.ijarcsa.org admin@ijarcsa.org
w
w
w
.ijarcsa.org
24
[Figure showing Opened 20 refreshable windows]
Observed the log file for active and idle connections. Even after opening 20 windows, there
are still 3 idle connections.
[Figure showing log details]
Earlier we had a test where we opened 25 refreshable windows without encountering any
kind of connection disruption with the database. Below is the screen shot.
Internaltional Journal of Advanced Research in Computer Sceience and Applications
Vol.1, Issue 5, November 2013
ISSN: 2321-872X-Online 2321-8932- Print
www.ijarcsa.org admin@ijarcsa.org
w
w
w
.ijarcsa.org
25
6. REFERENCE
Few sites are given below for references.
http://javatech.org/2007/11/c3p0-vs-dbcp-the-straight-dope/
http://cloverink.net/tag/apache-commons-dbcp/
http://www.questiondb.com/questions/2423490/how-good-is-oracle-universal-connection-
pool-ucp
Internaltional Journal of Advanced Research in Computer Sceience and Applications
Vol.1, Issue 5, November 2013
ISSN: 2321-872X-Online 2321-8932- Print
www.ijarcsa.org admin@ijarcsa.org
w
w
w
.ijarcsa.org
26

More Related Content

Similar to A Review of Connection Pooling Implementation in ICA Tool

Implementing load balancing algorithm in middleware system of volunteer cloud...
Implementing load balancing algorithm in middleware system of volunteer cloud...Implementing load balancing algorithm in middleware system of volunteer cloud...
Implementing load balancing algorithm in middleware system of volunteer cloud...
Gargee Hiray
 
Performance Evaluation of a Network Using Simulation Tools or Packet Tracer
Performance Evaluation of a Network Using Simulation Tools or Packet TracerPerformance Evaluation of a Network Using Simulation Tools or Packet Tracer
Performance Evaluation of a Network Using Simulation Tools or Packet Tracer
IOSRjournaljce
 
Iaetsd pinpointing performance deviations of subsystems in distributed
Iaetsd pinpointing performance deviations of subsystems in distributedIaetsd pinpointing performance deviations of subsystems in distributed
Iaetsd pinpointing performance deviations of subsystems in distributed
Iaetsd Iaetsd
 
DNIS in SRC
DNIS in SRCDNIS in SRC
DNIS in SRC
Ahmed Saeed
 
www.ijerd.com
www.ijerd.comwww.ijerd.com
www.ijerd.com
IJERD Editor
 
Dssv1.0
Dssv1.0Dssv1.0
Dssv1.0
Priyank Mehta
 
Diving into the Deep End - Kafka Connect
Diving into the Deep End - Kafka ConnectDiving into the Deep End - Kafka Connect
Diving into the Deep End - Kafka Connect
confluent
 
Cluster computing
Cluster computingCluster computing
Cluster computing
reddivarihareesh
 
Sql interview question part 2
Sql interview question part 2Sql interview question part 2
Sql interview question part 2
kaashiv1
 
Sql interview question part 2
Sql interview question part 2Sql interview question part 2
Sql interview question part 2
kaashiv1
 
Ebook2
Ebook2Ebook2
Ebook2
kaashiv1
 
IRJET- Load Balancing Cluster based on Linux Virtual Server
IRJET- Load Balancing Cluster based on Linux Virtual ServerIRJET- Load Balancing Cluster based on Linux Virtual Server
IRJET- Load Balancing Cluster based on Linux Virtual Server
IRJET Journal
 
Wireless Network Intrinsic Secrecy
Wireless Network Intrinsic SecrecyWireless Network Intrinsic Secrecy
Wireless Network Intrinsic Secrecy
IRJET Journal
 
Java Networking
Java NetworkingJava Networking
Java Networking
68SachinYadavSYCS
 
Distributed Computing
Distributed ComputingDistributed Computing
Distributed Computing
adil raja
 
Rain technology
Rain technologyRain technology
Rain technology
kavuuu26
 
Moving from CruiseControl.NET to Jenkins in the PVS-Studio development team
Moving from CruiseControl.NET to Jenkins in the PVS-Studio development teamMoving from CruiseControl.NET to Jenkins in the PVS-Studio development team
Moving from CruiseControl.NET to Jenkins in the PVS-Studio development team
PVS-Studio
 
Moving from CruiseControl.NET to Jenkins in the PVS-Studio development team
Moving from CruiseControl.NET to Jenkins in the PVS-Studio development teamMoving from CruiseControl.NET to Jenkins in the PVS-Studio development team
Moving from CruiseControl.NET to Jenkins in the PVS-Studio development team
Sofia Fateeva
 
Concurrency and parallel in .net
Concurrency and parallel in .netConcurrency and parallel in .net
Concurrency and parallel in .net
Mohammad Hossein Karami
 
indroduction of rain technology
indroduction of rain technologyindroduction of rain technology
indroduction of rain technology
narayan dudhe
 

Similar to A Review of Connection Pooling Implementation in ICA Tool (20)

Implementing load balancing algorithm in middleware system of volunteer cloud...
Implementing load balancing algorithm in middleware system of volunteer cloud...Implementing load balancing algorithm in middleware system of volunteer cloud...
Implementing load balancing algorithm in middleware system of volunteer cloud...
 
Performance Evaluation of a Network Using Simulation Tools or Packet Tracer
Performance Evaluation of a Network Using Simulation Tools or Packet TracerPerformance Evaluation of a Network Using Simulation Tools or Packet Tracer
Performance Evaluation of a Network Using Simulation Tools or Packet Tracer
 
Iaetsd pinpointing performance deviations of subsystems in distributed
Iaetsd pinpointing performance deviations of subsystems in distributedIaetsd pinpointing performance deviations of subsystems in distributed
Iaetsd pinpointing performance deviations of subsystems in distributed
 
DNIS in SRC
DNIS in SRCDNIS in SRC
DNIS in SRC
 
www.ijerd.com
www.ijerd.comwww.ijerd.com
www.ijerd.com
 
Dssv1.0
Dssv1.0Dssv1.0
Dssv1.0
 
Diving into the Deep End - Kafka Connect
Diving into the Deep End - Kafka ConnectDiving into the Deep End - Kafka Connect
Diving into the Deep End - Kafka Connect
 
Cluster computing
Cluster computingCluster computing
Cluster computing
 
Sql interview question part 2
Sql interview question part 2Sql interview question part 2
Sql interview question part 2
 
Sql interview question part 2
Sql interview question part 2Sql interview question part 2
Sql interview question part 2
 
Ebook2
Ebook2Ebook2
Ebook2
 
IRJET- Load Balancing Cluster based on Linux Virtual Server
IRJET- Load Balancing Cluster based on Linux Virtual ServerIRJET- Load Balancing Cluster based on Linux Virtual Server
IRJET- Load Balancing Cluster based on Linux Virtual Server
 
Wireless Network Intrinsic Secrecy
Wireless Network Intrinsic SecrecyWireless Network Intrinsic Secrecy
Wireless Network Intrinsic Secrecy
 
Java Networking
Java NetworkingJava Networking
Java Networking
 
Distributed Computing
Distributed ComputingDistributed Computing
Distributed Computing
 
Rain technology
Rain technologyRain technology
Rain technology
 
Moving from CruiseControl.NET to Jenkins in the PVS-Studio development team
Moving from CruiseControl.NET to Jenkins in the PVS-Studio development teamMoving from CruiseControl.NET to Jenkins in the PVS-Studio development team
Moving from CruiseControl.NET to Jenkins in the PVS-Studio development team
 
Moving from CruiseControl.NET to Jenkins in the PVS-Studio development team
Moving from CruiseControl.NET to Jenkins in the PVS-Studio development teamMoving from CruiseControl.NET to Jenkins in the PVS-Studio development team
Moving from CruiseControl.NET to Jenkins in the PVS-Studio development team
 
Concurrency and parallel in .net
Concurrency and parallel in .netConcurrency and parallel in .net
Concurrency and parallel in .net
 
indroduction of rain technology
indroduction of rain technologyindroduction of rain technology
indroduction of rain technology
 

Recently uploaded

8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
kalichargn70th171
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
lorraineandreiamcidl
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
Peter Muessig
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
brainerhub1
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
Peter Muessig
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
Quickdice ERP
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Julian Hyde
 

Recently uploaded (20)

8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
 

A Review of Connection Pooling Implementation in ICA Tool

  • 1. A REVIEW OF CONNECTION POOLING IMPLEMENTATION IN ICA TOOL Mtech(IT),Utkal University,Odisha ABSTRACT Connection Pooling is a concept of managing DB connections in the server side to ensure the maximum no. of connections cannot breach with the configured no. of connections. And it manages the idle connections (those are not actively in used) in the pool ready to reuse. In the existing ICA Tool system, when user can access that no. interfaces (which was defined in a configuration file) at a time and after that if they want to access a new interface, it will not allow end user to do anything. And at last user needs to restart tomcat server to release/reset the connections. With the implementation of connection pooling, we can overcome existing problem. Keywords:Connection Pooling, Database connection,JDBC ,Tomcat server 1. PURPOSE Connection Pooling is a concept of managing DB connections in the server side to ensure the maximum no. of connections cannot breach with the configured no. of connections. And it manages the idle connections (those are not actively in used) in the pool ready to reuse. In the existing ICA Tool system, when user can access that no. interfaces (which was defined in a configuration file) at a time and after that if they want to access a new interface, it will not allow end user to do anything. And at last user needs to restart tomcat server to release/reset the connections. With the implementation of connection pooling, we can overcome existing problem. 2. SCOPE Using connection pooling in ICA Tool, we can manage the database connections robustly, and as per connection pooling it ensures the no of connections are not breaching the defined nos. So server should run smoothly and no need to restart it and more to that user can use more no of interfaces. We had some analysis over the type of connection pooling to use in various applications. Generally we took (a) Commons DBCP (b) C3P0 and (c) Oracle UCP into consideration. 3. FEATURES We went over internet to find the best one that will suit for our multi-threaded applications. Internaltional Journal of Advanced Research in Computer Sceience and Applications Vol.1, Issue 5, November 2013 ISSN: 2321-872X-Online 2321-8932- Print www.ijarcsa.org admin@ijarcsa.org w w w .ijarcsa.org 22 Nishanta Ranjan Nanda Prav at Sutar Senior System Engineer, IBM India Pvt L imited, Kolkata 1 2 1 2
  • 2. However, according to the sources, we found that C3P0 DBCP It is better for multithreaded environment. It is better suited to single- threaded applications with high load C3p0 doesn’t actually make a connection available in the pool when it is checked- in. Instead the Helper Threads will detect these and do the work to get them back. This is missing in case of DBCP. It robustly handles DB disconnects and transparent reconnects on resume. It never recovered connections if the link was taken out from it.  Regarding Oracle UCP, we did not find much comparison. But some sites suggested that Oracle UCP does not fully support JDK 6/ojdbc6.jar. We are not considering this as it can create problem when we upgrade Java versions in future. 4. IMPLEMENTATION From this analysis, we decided to use C3P0 Connection pooling mechanism in our applications. We did a POC to observe the behavior of number of connections to the database and it seems like the number of connections do not exceed over the maximum number of connections mentioned. Each connection is properly allocated and de- allocated by the connection pooling mechanism. The dependent jar files are: 1) mchange-commons-java-0.2.3.4.jar 2) c3p0-0.9.2.1.jar The sample Connection Pooling class is attached herewith. 5. OUTPUT After implementing connection pooling in ICA Tool, It overcomes below existing limitations of ICA Tool. (a) In the existing application, the connections were not reused properly. But with the new implementation, the same is reused as and when required and never exceeds the MAX connection i.e. 6 mentioned in the configuration file. The connection opens and releases so efficiently. (b) The existing application never allows the user to login when it exceeds the maximum connection. From the testing it is found that user can open 10 to 12 windows (not more that that) but with the new implementation, it allows the user to open more number of windows. We have tested opening around 25 refreshable windows. Nevertheless, the idle connection still exists in the pool. This ensures that we can further open more number of windows. We could open 25 refreshable windows. Below is the screen shot. Internaltional Journal of Advanced Research in Computer Sceience and Applications Vol.1, Issue 5, November 2013 ISSN: 2321-872X-Online 2321-8932- Print www.ijarcsa.org admin@ijarcsa.org w w w .ijarcsa.org 23
  • 3. [Figure Showing 25 refreshable windows] (c) In the existing application, the connection object was made instance specific. For this reason, the connection object was not being released properly. With the new implementation, this fix is in place. The connection object releases so efficiently. Below is the log detail. [Figure showing log details] (d) The existing application encounters some sort of problems. When all the connections are in use in the pool and the next request comes, it throws an error “Maximum Number of Connection Reached”. This is not the general behavior of Connection pooling Mechanism. With the new implementation, when all the connections are in use in the pool and any further request comes, the request waits till it gets any released connection. Internaltional Journal of Advanced Research in Computer Sceience and Applications Vol.1, Issue 5, November 2013 ISSN: 2321-872X-Online 2321-8932- Print www.ijarcsa.org admin@ijarcsa.org w w w .ijarcsa.org 24
  • 4. [Figure showing Opened 20 refreshable windows] Observed the log file for active and idle connections. Even after opening 20 windows, there are still 3 idle connections. [Figure showing log details] Earlier we had a test where we opened 25 refreshable windows without encountering any kind of connection disruption with the database. Below is the screen shot. Internaltional Journal of Advanced Research in Computer Sceience and Applications Vol.1, Issue 5, November 2013 ISSN: 2321-872X-Online 2321-8932- Print www.ijarcsa.org admin@ijarcsa.org w w w .ijarcsa.org 25
  • 5. 6. REFERENCE Few sites are given below for references. http://javatech.org/2007/11/c3p0-vs-dbcp-the-straight-dope/ http://cloverink.net/tag/apache-commons-dbcp/ http://www.questiondb.com/questions/2423490/how-good-is-oracle-universal-connection- pool-ucp Internaltional Journal of Advanced Research in Computer Sceience and Applications Vol.1, Issue 5, November 2013 ISSN: 2321-872X-Online 2321-8932- Print www.ijarcsa.org admin@ijarcsa.org w w w .ijarcsa.org 26