• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Data Sources

 
Bhupendra Malviya
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Can anyone please tell me , what are the advantages of using a datasource over
DriverManager to get a connection,not just with reference to pure java but also from a j2ee application point of view.

Thanks
Bhupendra
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a JDBC question, and should be posted in the corresponding forum.
Data source is an optional package in JDBC2.0, and offers many improvements over DriverManager.getConnection(). Most notably, connection pooling is part of it. Perhaps the best reason not to use DriverManager.getConnection() is because it has known problems, as documented in Sun's Bug Database. Under certain circumstances, the call to DriverManager.getConnection() results in a locked thread, and if you run in the multi-app server, all the other apps that use DriverManager will be doomed.
[ October 27, 2003: Message edited by: Eugene Kononov ]
 
Bhupendra Malviya
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Eugene,
It was useful information and it helped me understand the topic.
Thanks again
Bhupendra
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic