This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes OO, Patterns, UML and Refactoring and the fly likes Implement Datasource Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Implement Datasource" Watch "Implement Datasource" New topic

Implement Datasource

Atul Mishra
Ranch Hand

Joined: Jun 08, 2006
Posts: 140

What is a best way to implement the datasource ? I use tomcat 5.0 and have configured datasource in the server. I am using DAO pattern to interact with the client.

Now my DAO should call database specific classes which obtains a connection from the datasource I implemented in Tomcat.

Which way/pattern should I use ? Is there a preferred implementation for a datasource[like a factory or something]

Please suggest me some good links of reading.

Scott Ambler
Ranch Hand

Joined: Dec 12, 2003
Posts: 608 has some good material on how to interact with databases.

- Scott

<a href="" target="_blank" rel="nofollow">Scott W. Ambler</a><br />Practice Leader Agile Development, IBM Rational<br /> <br />Now available: <a href="" target="_blank" rel="nofollow">Refactoring Databases: Evolutionary Database Design</a>
I agree. Here's the link:
subject: Implement Datasource
Similar Threads
DAOs and Datasources
Provided data file and 48-hour rule!
Java beans + JDBC
Resource for designing persistence layer