Hi,

I have below code for catching DAO exceptions,but I feel its not correct way to do this,Can some one point me to some library which will capture all exceptions which my code will throw and works with tomcat. I implementing Model2 mvc pattern and to my surprise I am able to show values to the view but database is not getting inserted.I am lost given that no exception is also being thrown anywhere.All logs looks clean but DB is not updated.

import java.sql.Connection;

public interface DAO {

    Connection getConnection() throws DAOException;

}

public class DAOException extends Exception {
    private static final long serialVersionUID = 19192L;

    public DAOException() {
    }
    public DAOException(String message) {
        this.message = message;
    }
    @Override
    public String getMessage() {
        return message;
    }
    public void setMessage(String message) {
        this.message = message;
    }
    private String message;

    @Override
    public String toString() {
        return message;
    }
}

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to