<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=skaffman" rel="nofollow">Kenny MacLeod</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-7788?redirect=false" rel="nofollow">SPR-7788</a></strong> and commented</p>
<p dir="auto">Chapter 7.2.1 (Enabling <code class="notranslate">@AspectJ</code> Support) says:</p>
<p dir="auto">"These libraries are available in the 'lib' directory of an AspectJ installation (version 1.5.1 or later required), or in the 'lib/aspectj' directory of the Spring-with-dependencies distribution."</p>
<p dir="auto">This needs to be updated to refer to the current distribution names.</p>
<hr>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398101008" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11241" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11241/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11241">#11241</a> Add Gradle task for building zip with dependencies (<em><strong>"depends on"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398115912" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/13537" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/13537/hovercard" href="https://github.com/spring-projects/spring-framework/issues/13537">#13537</a> Documentation update regarding aspectjrt and aspectjweaver jars usage (<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/5fe08040178d3e216998c22b4ad50528f7d981c2/hovercard" href="https://github.com/spring-projects/spring-framework/commit/5fe08040178d3e216998c22b4ad50528f7d981c2"><tt>5fe0804</tt></a></p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=alesj" rel="nofollow">Ales Justin</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-705?redirect=false" rel="nofollow">SPR-705</a></strong> and commented</p>
<p dir="auto">When using iBatis with TransactionAwareDataSourceProxy (TADS), DataSource resource gets registered twice (different instances - same underlying datasource).<br>
First with SqlMapClientTemplat on actual TADSP and then yet again with  TADSP's getConnection() method.<br>
So when it is cleaning up the transaction on APTransactionManager's triggerBeforeCompletion method, it gets already closed connection.</p>
<p dir="auto">My fix (currently is working ok :-):</p>
<p dir="auto">from SqlMapClientTemplate.java</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="public Object execute(SqlMapClientCallback action) throws DataAccessException {
    Assert.notNull(getSqlMapClient(), &quot;No SqlMapClient specified&quot;);
    SqlMapSession session = this.getSqlMapClient().openSession();
    try {
        DataSource dataSource = getDataSource();
        if (dataSource instanceof TransactionAwareDataSourceProxy) {
            dataSource = ((TransactionAwareDataSourceProxy)dataSource).getTargetDataSource();
        }
        Connection con = DataSourceUtils.getConnection(dataSource);
        try {
            session.setUserConnection(con);
            return action.doInSqlMapClient(session);
        }
        catch (SQLException ex) {
            throw getExceptionTranslator().translate(&quot;SqlMapClient operation&quot;, null, ex);
        }
        finally {
            DataSourceUtils.closeConnectionIfNecessary(con, dataSource);
        }
    }
    finally {
        session.close();
    }
}"><pre class="notranslate"><code class="notranslate">public Object execute(SqlMapClientCallback action) throws DataAccessException {
    Assert.notNull(getSqlMapClient(), "No SqlMapClient specified");
    SqlMapSession session = this.getSqlMapClient().openSession();
    try {
        DataSource dataSource = getDataSource();
        if (dataSource instanceof TransactionAwareDataSourceProxy) {
            dataSource = ((TransactionAwareDataSourceProxy)dataSource).getTargetDataSource();
        }
        Connection con = DataSourceUtils.getConnection(dataSource);
        try {
            session.setUserConnection(con);
            return action.doInSqlMapClient(session);
        }
        catch (SQLException ex) {
            throw getExceptionTranslator().translate("SqlMapClient operation", null, ex);
        }
        finally {
            DataSourceUtils.closeConnectionIfNecessary(con, dataSource);
        }
    }
    finally {
        session.close();
    }
}
</code></pre></div>
<hr>
<p dir="auto"><strong>Affects:</strong> 1.1.4</p>