Spring Framework CannotGetJdbcConnectionException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework CannotGetJdbcConnectionException class.

This code example shows how to use the following methods:
	 */ 
	public final DataSource getDataSource() { 
		return (this.jdbcTemplate != null ? this.jdbcTemplate.getDataSource() : null); 
	} 
 
	/** 
	 * Set the JdbcTemplate for this DAO explicitly, 
	 * as an alternative to specifying a DataSource. 
	 */ 
	public final void setJdbcTemplate(JdbcTemplate jdbcTemplate) { 
		this.jdbcTemplate = jdbcTemplate; 
		initTemplateConfig(); 
	} 
 
	/** 
	 * Return the JdbcTemplate for this DAO, 
	 * pre-initialized with the DataSource or set explicitly. 
	 */ 
	public final JdbcTemplate getJdbcTemplate() { 
	  return this.jdbcTemplate; 
5
CodeRank
This code example shows how to use the following methods:
	public static Connection getConnection(DataSource dataSource) throws CannotGetJdbcConnectionException { 
		try { 
			return doGetConnection(dataSource); 
		} 
		catch (SQLException ex) { 
			throw new CannotGetJdbcConnectionException("Could not get JDBC Connection", ex); 
		} 
	} 
 
	/** 
	 * Actually obtain a JDBC Connection from the given DataSource. 
	 * Same as {@link #getConnection}, but throwing the original SQLException. 
	 * <p>Is aware of a corresponding Connection bound to the current thread, for example 
	 * when using {@link DataSourceTransactionManager}. Will bind a Connection to the thread 
	 * if transaction synchronization is active (e.g. if in a JTA transaction). 
	 * <p>Directly accessed by {@link TransactionAwareDataSourceProxy}. 
	 * @param dataSource the DataSource to obtain Connections from 
	 * @return a JDBC Connection from the given DataSource 
	 * @throws SQLException if thrown by JDBC methods 
	 * @see #doReleaseConnection 
4
CodeRank