strategy « DAO « JPA Q&A





1. Is my DAO strategy ok?    stackoverflow.com

I'm using Hibernate. The question is at the bottom.

The current strategy

It's simple. First of all, I have a basic Dao<T>.
public class Dao<T> {
    private Class<T> persistentClass;
    ...

2. Handling Hibernate Exception in Dao classes - Any strategy ?    forum.hibernate.org

Hello, I have coded my Dao with a generic class, and even a DaoException class, but I'm still wondering if I'm doing the right thing, and how to handle exceptions, that is, how to react to an exception after it occurred. I was told, in case an Hibernate Exception is fired up, to roll back the transaction, close the session, and ...