This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes JDBC and the fly likes DriverManager vs Datasource Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "DriverManager vs Datasource" Watch "DriverManager vs Datasource" New topic
Author

DriverManager vs Datasource

scott miles
Ranch Hand

Joined: Jun 16, 2011
Posts: 70
I have seen some applications using drivermanager though spome others are using DataSource. One high level advantage i know of using DataSource over drivermanager is that it provides connectionPooling. Is it the main advantage of using DataSource over drivermanager ?

Another question is what kind of advantage it provides even if we are getting the connection from pool instead of drivermanager? i mean dont we have to worry about connection close in connectionpooling or some other advantages are there? what happens if we dont close the connection in case of datasource . will it keep it in pool even we are not closing the connection or will it still be considered as a case of connection leak?
joy b chakravarty
Ranch Hand

Joined: May 16, 2011
Posts: 62

dataSource vs driverManager


Cheers, Joy [SCJP 1.4, SCBCD 5.0]
get high on alcohol, algorithm or both
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: DriverManager vs Datasource
 
Similar Threads
Getting connection from pool?
User credientials doubt
PreparedStatement with Connection Pooling
Regarding Connection pool
DriverManager vs DataSource