public boolean transaction(Transaction trans) {
		Connection conn = null;
		try {
			conn = ds.getConnection();
			conn.setAutoCommit(false);
			trans.trans(conn);
			conn.commit();
			return true;
		} catch (SQLException ex) {
			Logger.getLogger(DB.class.getName()).log(Level.SEVERE, null, ex);
			if (null != conn) {
				try {
					conn.rollback();
				} catch (SQLException e) {
					Logger.getLogger(DB.class.getName()).log(Level.SEVERE, null, e);
				}
			}
			return false;
		} finally {
			if (null != conn) {
				try {
					conn.close();
				} catch (SQLException ex) {
					Logger.getLogger(DB.class.getName()).log(Level.SEVERE, null, ex);
				}
			}
		}
	}