<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=pathos" rel="nofollow">Mathias Bogaert</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-168?redirect=false" rel="nofollow">SPR-168</a></strong> and commented</p>
<p dir="auto">It would be very usefuly to be able to enable query caching on all DAO's that extend HibernateDaoSupport. Add a boolean cacheQueries to HibernateTemplate, and evaluate it in createQuery. Then add a setter to HibernateDaoSupport which calls the setter on HibernateTemplate.</p>
<hr>
<p dir="auto">No further details from <a href="https://jira.spring.io/browse/SPR-168?redirect=false" rel="nofollow">SPR-168</a></p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=borislav.andruschuk" rel="nofollow">Andruschuk Borislav</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-7393?redirect=false" rel="nofollow">SPR-7393</a></strong> and commented</p>
<p dir="auto">We have some DAO which call an other DAO in RowMapper to get linked entities. Sometimes we have to do that to link different loosely coupled entities in depends of included application modules, data base state etc. After migration from Spring 2.5.6 to Spring 3.X we've got the following issue:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="org.hibernate.HibernateException: connnection proxy not usable after transaction completion
	at org.hibernate.jdbc.BorrowedConnectionProxy.invoke(BorrowedConnectionProxy.java:66)
	at $Proxy6.prepareStatement(Unknown Source)
	at org.springframework.jdbc.core.PreparedStatementCreatorFactory$PreparedStatementCreatorImpl.createPreparedStatement(PreparedStatementCreatorFactory.java:245)
	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:580)"><pre class="notranslate"><code class="notranslate">org.hibernate.HibernateException: connnection proxy not usable after transaction completion
	at org.hibernate.jdbc.BorrowedConnectionProxy.invoke(BorrowedConnectionProxy.java:66)
	at $Proxy6.prepareStatement(Unknown Source)
	at org.springframework.jdbc.core.PreparedStatementCreatorFactory$PreparedStatementCreatorImpl.createPreparedStatement(PreparedStatementCreatorFactory.java:245)
	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:580)
</code></pre></div>
<p dir="auto">It happens on prepared statement creation for query need to be executed after execution any SQL statement in DAO called from RowMapper. I've created Unit test to show this incident.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0 GA, 3.0.1, 3.0.2, 3.0.3</p>
<p dir="auto"><strong>Attachments:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/secure/attachment/16931/RowMapperTest.java" rel="nofollow">RowMapperTest.java</a> (<em>3.19 kB</em>)</li>
</ul>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/browse/SEC-1778" rel="nofollow">SEC-1778</a> MutableAclService#updateAcl() fails in JPA environment (<em><strong>"is duplicated by"</strong></em>)</li>
</ul>
<p dir="auto"><strong>Referenced from:</strong> commits <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/b261d336b18ccf852d0def64cdfd852c052ef355/hovercard" href="https://github.com/spring-projects/spring-framework/commit/b261d336b18ccf852d0def64cdfd852c052ef355"><tt>b261d33</tt></a></p>