which scenarios we go for jdbc,and which scenario we go for
connection polling and wat r advantages and disadvantages
using connection pooling.

Answer Posted / mukundan

First part of the question seems irrelevant as JDBC has to
be used to access RDB irrespective of whether Connection
pooling is used or not.

Advantage of creating and using connection pooling is to
share the number of connections to the database in an
organized and distributed ways when the same RDB is used by
multiple applications.

Using connection pooling is advantageous
(1) the application doesn't overshoot with the number of
connections available/allotted for the application
(2) creating connection with a RDB is a costly operation
where as this is done one time and a pool of connection is
created during the startup of the application
(3) Connections from the pool are readily available for use
and they are reused which is much faster as per (2) above

Disadvantages of Connection pooling:
(1) When multiple application uses a RDB, each application
grabs its share (the allotted number of connections) during
start-up irrespective of its usage of the grabbed
connections. For example, if one application grabs 100
connections up front and its peak usage is only 40 or 50
then they are strictly not available to any other
application who's peak usage may be more than their allocation.
(2) If connections are not released appropriately by the
applications then the performance of the systems could go
haywire.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain some new features available in jdbc 4.0?

602


How to make updates to updatable result sets in jdbc?

480


Does the database server have to be running Java or have Java support in order for my remote JDBC client app to access the database?

510


What are the new features available in jdbc 4.0?

522


Which is better odbc or jdbc?

497






What is jdbc driver?

453


Explain about multiple implementations and drive manager?

556


Why can't Tomcat find my Oracle JDBC drivers in classes111.zip?

565


List the common jdbc exceptions ?

557


What are types of jdbc drivers?

508


What are the types of jdbc drivers that exist?

532


Why isn't the java.sql.DriverManager class being found?

558


Is jdbc open source?

446


What is jdbc explain?

486


What is a jdbc connection?

464