Code example for TransactionAwareDataSourceProxy

	protected DataSource getDataSourceToUse(DataSource originalDataSource) { 
		if (originalDataSource instanceof TransactionAwareDataSourceProxy) { 
			return originalDataSource; 
		return new TransactionAwareDataSourceProxy(originalDataSource); 
	 * This implementation returns {@code true}: We can guarantee 
	 * to receive the same Connection within a transaction, as we are 
	 * exposing a TransactionAwareDataSourceProxy. 
	public boolean supportsAggressiveRelease() { 
		return true; 
Connect your IDE to all the code out there  Get Codota for Java