IT Community - Software Programming, Web Development and Technical Support

Connection pooling

This is a discussion on Connection pooling within the Java Programming forums, part of the Software Development category; Connection pooling? With servlets, opening a database connection is a major bottleneck because we are creating and tearing down a ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > Java Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 09-21-2007, 12:15 AM
vijayanand vijayanand is offline
D-Web Analyst
 
Join Date: Feb 2007
Posts: 293
vijayanand is on a distinguished road
Default Connection pooling

Connection pooling?

With servlets, opening a database connection is a major bottleneck because we are creating and tearing down a new connection for every page request and the time taken to create connection will be more.
Creating a connection pool is an ideal approach for a complicated servlet. With a connection pool, we can duplicate only the resources we need to duplicate rather than the entire servlet. A connection pool can also intelligently manage the size of the pool and make sure each connection remains valid. A number of connection pool packages are currently available. Some like DbConnectionBroker are freely available from Java Exchange Works by creating an object that dispenses connections and connection Ids on request.
The ConnectionPool class maintains a Hastable, using Connection objects as keys and Boolean values as stored values. The Boolean value indicates whether a connection is in use or not. A program calls getConnection( ) method of the ConnectionPool for getting Connection object it can use; it calls returnConnection( ) to give the connection back to the pool.
__________________

J.Vijayanand
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is a pre-requisite for connection pooling? anbuchezhians VB.NET Programming 3 09-19-2007 01:31 AM
Administrator Connection (DAC) Sathish Kumar Database Support 3 09-03-2007 07:54 AM
ADO.NET Connection Pooling @ Glance Gopisoft VB.NET Programming 0 08-23-2007 02:48 AM
What is the difference between internet connection and GPRS or mobile net connection? sathishkumar Computer Hardware 2 08-11-2007 04:16 AM
ADO.NET Connection Pooling at a Glance Gopisoft ASP and ASP.NET Programming 0 07-17-2007 12:12 AM


All times are GMT -7. The time now is 11:24 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0