ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Davide Romanini (JIRA)" <ibatis-...@incubator.apache.org>
Subject [jira] Commented: (IBATIS-376) Hot deploy issue
Date Fri, 26 Oct 2007 21:17:51 GMT

    [ https://issues.apache.org/jira/browse/IBATIS-376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12538104

Davide Romanini commented on IBATIS-376:

I also found this issue. I'm using iBatis with Spring framework facilities (SqlMapClientTemplate).
In my case it seem that the problem raises from autogenerated proxy classes that directly
invoke methods on SqlMapClientImpl.

The suggested patch is not very clear to me: I suppose the best place to clean up the threadlocal
is in the SqlMapClientImpl#endTransaction() method, so in a transaction the same SqlMapSession
is used. But dynamic proxies do not invoke start/endTransaction so it doesn't solve the issue
I think.

This bug is a bit old, there is any iBatis developer here to comment on this?

> Hot deploy issue
> ----------------
>                 Key: IBATIS-376
>                 URL: https://issues.apache.org/jira/browse/IBATIS-376
>             Project: iBatis for Java
>          Issue Type: Improvement
>          Components: SQL Maps
>    Affects Versions: 2.2.0
>         Environment: ALL
>            Reporter: kevin chae
> Hi Clinton and team.
> I found an interesting issue.
> In case of hot deploy
> ThreadLocal localSqlMapSession causes a memory leak.
> As you know, iBatis calls getLocalSqlMapSession().close();
> but WAS classLoader remains in the memory after a hot deployment
> because classLoader still has a reference of the ThreadLocal.
> It needs to explictly set null
> I tried to test with the code below and it works fine.
> getLocalSqlMapSession().set(null);
> I hope to improve iBatis
> Otherwise iBatis works greate !
> Cheers !

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message