• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

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: 43081
77
  • 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: 2662
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.
     
    Montana has cold dark nights. Perfect for the heat from incandescent light. Tiny ad:
    We need your help - Coderanch server fundraiser
    https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
    reply
      Bookmark Topic Watch Topic
    • New Topic