• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

why should i use connection pooling ?

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
plz tell me, what is connection pooling and why should i use connection pooling in my application . i can make several connection using jdbc or thin line driver with database.
i have studied connection pooling but i am still confused.
plz help me
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The biggest performance problem when dealing with remote databases is the time taken to establish a connection.
In the case of very short operations like selecting a single attribute from a single row, the connection time might be orders of magnitude longer, such as a fraction of a second for the operation, but over a second to connect.
Connection Pooling gets rid of this by establishing connections before they are required and holding them until someone asks for one.
Other advantages to Connection Pooling are:
*it can reuse connections if they are returned, reducing work on the database to keep creating connections,
* they can be made to expand and contract as more connections are needed, which protects database resources from being wasted,
* and it can also have an upper limit of connections, to protect too many connections from choking the database.
Dave
 
Aamir Iqbal
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanx dave,
but there is one thing more, I have made html reports for online reporting. and made connection many times in that report and delete that connection.
do u think, it is not good way ? if yes, than plz guide me how should i do this , and plz give me any third party tool for reporting in intranet based environment.
thanx
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can probably improve your code by reusing the Connection in the same page rather than opening and closing several Connections.
If you want a Connection Pool to use, this Google search returned several possibilities, including jdbcpool
Dave
 
Brace yourself while corporate america tries to sell us its things. Some day they will chill and use tiny ads.
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic