Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Data Sources  RSS feed

 
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
 
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
 
Evil is afoot. But this tiny ad is just an ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!