• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Doubt in Datasource and Java Database connectivity

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 2661
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
      Number of slices to send:
      Optional 'thank-you' note:
    • 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
      Number of slices to send:
      Optional 'thank-you' note:
    • 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.
     
    What is that? Is that a mongol hoarde? Can we fend them off with this tiny ad?
    the value of filler advertising in 2021
    https://coderanch.com/t/730886/filler-advertising
    reply
      Bookmark Topic Watch Topic
    • New Topic