public void remove(Long id) throws Exception {
        DataSource dataSource = ConnectionManager.getDatasource();


        try {

            conn = dataSource.getConnection();
            ps = conn.prepareStatement(""
                    + "delete from tasks t where t.id = " + id);
            ps.executeUpdate();

        } catch (final SQLException e) {
            throw new Exception(e);
        } finally {
            if (rs != null) {
                try {
                    rs.close();
                } catch (final SQLException ignored) {
                    // ignored
                }
            }
            if (ps != null) {
                try {
                    ps.close();
                } catch (final SQLException ignored) {
                    // ignored
                }
            }
            if (conn != null) {
                try {
                    conn.close();
                } catch (final SQLException ignored) {
                    // ignored
                }
            }
        }
    }