Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DriverManager vs Datasource

 
scott miles
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 62
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dataSource vs driverManager
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic