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 / priyabrata patro

See from first onwards i am speaking
there are two types of connection object one is Direct
Connection object and second is Pooled connection object
The object which is created,managed ,destroyed manually is
called as Direct connection object and if connection object
is collected from connetion pool is called as Pooled
connection object
now let us see each very clearly
When ever we try to create connection object than new
connection will be created ,ok,now when new clint will come
dynamically than he will use readily available connection
object to have interaction with underlying database
software,now , suppose multiple clients will come to use
connection object than what happens, Since, we have only one
connection object than we can provide service to one client
at time , i mean second client has to wait till first client
completes his work , think about large scale application, i
mean if more than two clients will come to use this
connection object e.g. Banking application .Definitely one
connection object can not provide service to multiple
clients , see , it can provide but will take much time to
provide service .ok, now think about our passions ,hardly
how much time we can wait for twenty thirty or forty minutes
but if it exceeds than what will happen , suddenly you will
leave that bank and will close account and which will , in
turn , mishap on organisation who has developed that project.
So , we have to provide service right there exactly
connection pool will come on to the picture.ok, so it is
highly recommended to work with connection pool concept.
now another thing is jdbc see
jdbc is a specification given by sun microsystem and it is
again devided into four types and jdbc connection pool
concept is coming under type-3 ok so don't use jdbc term
separately rather than use type-1 or type-2 or type-4 and my
recommendation is to work with type-4 driver only.
Before going to advantage and disadvantage first what is
conncetion pool?
connection pool is a pool which contains set of readyily
available conncetion objects which can provide service to
more number of clients using less number of conncetion
object.e.g. think about our college , what happens here.
each student occupies chair to seat provided by
administratator , if administrator tells each student to
bring his own chair than what will happen just think and
compare it exactly with Direct connection object ok.
now come to chairs provided by administrator i mean they
think that each session will contain 100 students and
providing 100 chairs at a time and providing service to more
than 100 students.how, each session will contain 100
students so how many sessions can be conducted per day .now,
just imagine how connection pool is compatible with given
example.
Advantage
---------
->Advantage what i have given above not only that programmer
should think it is burden of creating , managing ,destroying
conncetion object , each task responisbility will be taken
care by connection pool
Disadvantage
------------
->I hope you will not get any disadvantage from connection pool
for more information call 9989683928 , i belong to hyd

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how data flows from view to db and reverse

1622


How do I receive a ResultSet from a stored procedure?

515


What is jdbc explain?

486


How can I get information about foreign keys used in a table?

522


How to check jdbc connection in linux?

505






How many types of jdbc drivers are there?

543


What are the three basic components of the odbc architecture?

461


What does it mean to "materialize" data?

514


What is jdbc connection?

644


Is jdbc faster than hibernate?

562


What is JDBC API and when do we use it?

564


What is meant by dao?

510


What does executeupdate return in java?

487


Where is jdbc used?

477


What is the benefit of having jdbcrowset implementation? Why do we need a jdbcrowset like wrapper around resultset?

484