Code example for DataSource

Methods: getConnection

0
 
	} // init. 
 
	public Connection getConnection() {
		try { 
			return dataSource.getConnection();
		} catch (SQLException e) {
			e.printStackTrace();
		} 
		return null; 
	} // getConnection. 
 
	protected void closeQuiet(Connection conn) {
 
		if (null != conn) {
 
			try { 
				conn.close();
			} catch (SQLException e) {
				e.printStackTrace();
			}