title: Is it better to instantiate a new JdbcTemplate in every query or to inject a single one everywhere?
body: <p>I have a Java library where I access the DB via JDBC using Spring's JDBC support. This library contains approximately a DAO class for each table I need to access, which are over a hundred. Currently I instantiate a new JdbcTemplate, or one of its variants, each time I need to perform a new query. Is this considered good practice or should I reuse a single JdbcTemplate as much as I can? I've actually seen examples of both approaches in either books or online documentation.</p>
  
  <p>The context is a J2EE application, but ideally the code should be usable in different contexts, e.g. in offline tests or command line support tools.</p>