• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Joe Ess
  • salvin francis

Doubt in Datasource and Java Database connectivity

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Can anyone explain me why v go for Datasource inspite of havin JDBC.
I don hav the clear idea of Datasource.It will be helpful if anyone clear my doubt.
Thanks in advance....
 
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

On your way in you may have missed that we have a policy on screen names here at JavaRanch. Basically, it must consist of a first name, a space, and a last name, and not be obviously fictitious. Since yours does not conform with it, please take a moment to change it, which you can do right here.

As to your question, DataSource is part of JDBC. As its javadocs mention, it provides functionality DriverManager doesn't, e.g. easier JNDI integration, connection pools and distributed transactions.
 
Senthil Kumar
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh Ok... Let me confirm tat wat i have understood is correct.
So In addition to the connection to the database,Datasource provided some more features like JNDI,Connection Poolin etc.,
IS that correct?
 
Bartender
Posts: 2657
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Senthil Java:
Oh Ok... Let me confirm tat wat i have understood is correct.
So In addition to the connection to the database,Datasource provided some more features like JNDI,Connection Poolin etc.,
IS that correct?

  • provides JNDI: incorrect. it uses JNDI.
  • provides Connection Pooling: correct.
  • Regards, Jan
     
    Senthil Kumar
    Ranch Hand
    Posts: 33
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    thanks a lot for all of your replies....
     
    Bartender
    Posts: 10336
    Hibernate Eclipse IDE Java
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    "Senthil Java"

    Can I bring your attention to Ulf's first post. Your display name is not valid. Please change it here.

    Be aware that users with invalid display names cannot participate in book promotions and may have their accounts closed.

    Thank you.
     
    And will you succeed? Yes you will indeed! (98 and 3/4 % guaranteed) - Seuss. tiny ad:
    Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Apps
    https://coderanch.com/t/722574/Sauce-Labs-World-Largest-Continuous
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!