Instantiate a JdbcTemplate with a JDBC connection. #233

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Contributor

acogoluegnes commented Feb 13, 2013

The given connection is wrapped into a SingleConnectionDataSource.
The suppressClose flag is accessible in a constructor for flexibility,
but another constructor needs only the JDBC connection, and sets the
suppressClose flag to true. Most people would use this second constructor.

Issue: SPR-10049

I have signed and agree to the terms of the SpringSource Individual
Contributor License Agreement.

Instantiate a JdbcTemplate with a JDBC connection.
The given connection is wrapped into a SingleConnectionDataSource.
The suppressClose flag is accessible in a constructor for flexibility,
but another constructor needs only the JDBC connection, and sets the
suppressClose flag to true. Most people would use this second constructor.

Issue: SPR-10049

@ghost ghost assigned jhoeller Feb 13, 2013

Member

snicoll commented Apr 18, 2014

Thanks for your contribution. This seems like a super-specific use of JmsTemplate which is meant to work with a DataSource, whatever the implementation might be.

I would argue that your example could be written as easily with a utility method that takes the connection and return the JdbcTemplate, wrapping the connection in the SingleConnectionDataSource.

I am closing the request for that reason. Feel free to reopen if you disagree.

@snicoll snicoll closed this Apr 18, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment