Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JDBC and the fly likes Doubt in Datasource and Java Database connectivity Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Doubt in Datasource and Java Database connectivity" Watch "Doubt in Datasource and Java Database connectivity" New topic
Author

Doubt in Datasource and Java Database connectivity

Senthil Kumar
Ranch Hand

Joined: Oct 14, 2007
Posts: 33
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
Marshal

Joined: Mar 22, 2005
Posts: 41079
    
  43
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.


Ping & DNS - my free Android networking tools app
Senthil Kumar
Ranch Hand

Joined: Oct 14, 2007
Posts: 33
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

Joined: Dec 20, 2006
Posts: 2491
    
    8

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


    OCUP UML fundamental and ITIL foundation
    youtube channel
    Senthil Kumar
    Ranch Hand

    Joined: Oct 14, 2007
    Posts: 33
    thanks a lot for all of your replies....
    Paul Sturrock
    Bartender

    Joined: Apr 14, 2004
    Posts: 10336

    "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.


    JavaRanch FAQ HowToAskQuestionsOnJavaRanch
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Doubt in Datasource and Java Database connectivity
     
    Similar Threads
    Doubt with this JavaScript
    Doubt
    doubt!!!
    Doubt using iReport - difference between Parameter and Field