What is connection pooling? what is the main advantage of using connection pooling?

Showing Answers 1 - 0 of 0 Answers

sagar kumar

  • Jun 12th, 2007
 

whenever our web app needs an access to database it connects to the database. it will be disadvantageous if it connect every time a user sends a request for a particular data.so the server maintains a pool of connection instances. so if a request comes it will take a instance from the pool and serve.because the database connection is tedious task so it is better to maintain a pool of connection instances. it makes the access faster.

  Was this answer useful?  Yes

in traditional jdbc we are able to create two-tier applcns by creating various DSNs in the localmachine. creating various DSNs for various JDBC applcns may also kill the performance of the JDBC applcn. whereas in JDBC 3.0, we have a concept calllng CONNECTION POOLING through which we can develop three tier applcns without creating any DSNs into the local machine (Connection Pooling is a process of maintaining pool of readily available database connection objects.). This concept comealong with J2EE enabled servers like weblogic, websphere,etc....

  Was this answer useful?  Yes

Connection pooling is used to improve the performance of an application.here we can create any number of connection objects and keep it in a pool. When we want to use connection object , we can take an object from a pool ,use it .Instead of throwing it out , again put into the pool so that you can use it at a later point of time.
 
     if you take weblogic , you need DataSource object to get the connection from connection pool.

  Was this answer useful?  Yes

sampra

  • Feb 11th, 2008
 

To connecting with any data base need connection and afetr compltion of task that connection get expire so next tim again we need to create connection  its degrade the performance
To avoid this we have coonction pooling in the connection pooling we can crete some coonection wn needed take connection use it and afetr that connection will return to the pool...By this way we can increase performance

  Was this answer useful?  Yes

aarty.lamba

  • Nov 24th, 2009
 

WebSphere Application Server enables administrators to establish a pool of database connections that can be shared by applications on an application server. Connection pooling spreads the connection overhead across several user requests, thereby conserving resources for future requests.

Connection pooling can improve the response time of any application that requires connections, especially Web-based applications. When a user makes a request over the Web to a resource, the resource accesses a datasource. Most user requests do not incur the overhead of creating a new connection because the datasource may locate and use an existing connection from the pool of connections. When the request is satisfied and the response is returned to the user, the resource returns the connection to the connection pool for reuse. Again, the overhead of a disconnect is avoided. Each user request incurs a fraction of the cost of connection or disconnecting. After the initial resources are used to produce the connections in the pool, additional overhead is insignificant because the existing connections are reused.

  Was this answer useful?  Yes

Ishan Dhande

  • Jan 10th, 2017
 

So now lets talk about the word "Costly"

If we look at the time consumption in creating a connection, socket creation takes lot of time when compared to actual query execution [which is the operation we do].

So we say that "a database connection is always costly" since its creating a socket connection every time to talk to the DB and this socket resource is limited one.

In overcoming the above defaults, we are going for Connection Pooling.

Connection Pooling means creating the connections [while initializing] and reusing them from the pool of connections rather than creating new one every time.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Answer Question

Click here to Login / Register your free account


 
Send   Reset

 

Related Answered Questions

 

Related Open Questions