tags:

views:

822

answers:

5

Can anyone point me to a well written DAO using JDBC, that covers all the exceptions a DAO should handle.

I looked at some samples at java.sun.com, their blue prints but there is a lot of theory and less code.

Looking through Spring DAO source code will be enlightening but that's way too complicated for me.

A: 

Spring framework comes to mind.

Dev er dev
+5  A: 

Spring JdbcTemplate provides most plumbing you will need to implement a JDBC DAO.

Further Information at:

http://static.springframework.org/spring/docs/2.0.x/reference/jdbc.html

Reginaldo
A: 

If you are looking for a more simple implementation, you should take a look here. However, a more complex sample is found here.

Hope it helps.

nandokakimoto
A: 

You can also refer in some ORM tools - like Hibernate, TopLink, Apache Cayenne etc. Sometimes ORM is very useful.

Zorkus
A: 

An example can be found at http://daoexamples.sourceforge.net/. Looking through Google's code search, I found this that has some DAOs. You may also want to do some research on generic DAOs, start here and here.

mangoDrunk