The moose likes JDBC and Relational Databases and the fly likes Difference between DataSource & DriverManager Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Difference between DataSource & DriverManager" Watch "Difference between DataSource & DriverManager" New topic

Difference between DataSource & DriverManager

manish ahuja
Ranch Hand

Joined: Oct 23, 2003
Posts: 312
Hi All

Can someone ellaborate on the differences between the 2 data resource approaches (DataSource & Drivermanager). What are the advantages Of DataSource over DriverManager.

Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 32312

A DataSource is managed by the application server. It handles connection pooling and the like. A DriverManager lets you get a connection in a standalone application. You are responsible for handling everything in the code yourself.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
I agree. Here's the link:
subject: Difference between DataSource & DriverManager
It's not a secret anymore!