Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What are object pooling and connection pooling and difference?

Answer Posted / prasenjit

Opening a database connection is a resource intensive and
time consuming operation. Connection pooling increases the
performance of Web applications by reusing active database
connections instead of creating a new connection with every
request. Connection pool manager maintains a pool of open
database connections. When a new connection requests come
in, the pool manager checks if the pool contains any unused
connections and returns one if available. If all connections
currently in the pool are busy and the maximum pool size has
not been reached, the new connection is created and added to
the pool. When the pool reaches its maximum size all new
connection requests are being queued up until a connection
in the pool becomes available or the connection attempt
times out.

Object Pool

An Object Pool may be defined as a container of objects that
are ready for use. Lists of ready-to-be-used objects are
contained in this pool. Whenever a new request for an object
creation comes in, the request is served by allocating an
object from the pool. Therefore, it reduces the overhead of
creating and re-creating objects each time an object
creation is required. "An object pool is an object that
holds a list of other objects, ready to make them available
for use (to yet another object, probably). It does the
management work involved, like keeping track of which
objects are currently in use, how many objects the pool
holds, whether this number should be increased."

The biggest advantage of using Object Pooling is that it
minimizes the consumption of memory and the system's
resources by recycling and re-using objects as and when it
is needed and serving the request for new objects from the
pool of ready-to-be-used objects. The objects that the
application
is done with (the objects are no longer needed) are sent
back to the pool rather than destroying them from the memory.

Is This Answer Correct ?    10 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Please explain what is reflection and what is it for?

945


What is a web service in .net?

1100


How ccw (com callable wrapper) and rcw (runtime callable wrappers) works?

1021


Please explain what is the difference between constants and read-only variables?

1133


How to Create and Consume a Web Service?

3411


Can you give an example of when it would be appropriate to use a web service as opposed to a non-serviced .NET component

2514


Compare & contrast rich client (smart clients or windows-based) & browser-based web application

971


What is the concept of inheritance and how it works in .net?

1015


What is the purpose of enumerable class in .net?

1097


I want to serialize instances of my class. Should I use xmlserializer, soapformatter or binaryformatter?

1066


What is meant by managed and unmanaged code?

1147


How do I use the thread pool?

1049


What is the difference between encrypting a password and applying a hashing?

1164


Can a dll be changed to an exe?

1152


Explain the difference between .net 2000 and .net 2005(features)? Which one is better?

1021