Code example for Connection

Methods: close, commit, rollback

0
	} 
 
	public boolean closeConn() { 
		boolean isCommit = true;
		try { 
			conn.commit();
		} catch (SQLException e) {
			isCommit = false;
			e.printStackTrace();
			try { 
				conn.rollback();
			} catch (SQLException e1) {
				e1.printStackTrace();
			} 
		} finally { 
			try { 
				conn.close();
			} catch (SQLException e) {
				e.printStackTrace();
			} 
		} 
		return isCommit;