Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt in Datasource and Java Database connectivity

 
Senthil Kumar
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....
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • 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?
 
Jan Cumps
Bartender
Posts: 2586
11
C++ Linux Netbeans IDE
  • 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....
     
    Paul Sturrock
    Bartender
    Posts: 10336
    Eclipse IDE Hibernate 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.
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic