ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Clinton Begin (JIRA)" <ibatis-...@incubator.apache.org>
Subject [jira] Closed: (IBATIS-197) Call "getDataSource()" of SqlMapClientImpl will cause application to hang
Date Mon, 03 Oct 2005 02:13:51 GMT
     [ http://issues.apache.org/jira/browse/IBATIS-197?page=all ]
Clinton Begin closed IBATIS-197:

    Fix Version: 2.2.0
     Resolution: Fixed
      Assign To: Clinton Begin

> Call "getDataSource()" of SqlMapClientImpl will cause application to hang
> -------------------------------------------------------------------------
>          Key: IBATIS-197
>          URL: http://issues.apache.org/jira/browse/IBATIS-197
>      Project: iBatis for Java
>         Type: Bug
>  Environment: NT, Orable,JONAS
>     Reporter: cailuyu
>     Assignee: Clinton Begin
>      Fix For: 2.2.0

> Hi
>   We found a system-hanging problem in our application.
>   In our application, we need the DataSource, so we call  getDataSource() from SqlMapClient
>   The implementation of this methos is:
>   public DataSource getDataSource() {
>     return getLocalSqlMapSession().getDataSource();
>   }
>   This method will try to get a session first, but if it can't find a existent session,
it will create a new one. but after that no one will close this session, and then the system
will be blocked.
>   So, is there any method can help us to release this session? for now we change this
method like this, and everything is ok:
>     public DataSource getDataSource() {
>     DataSource ds = getLocalSqlMapSession().getDataSource();
>     getLocalSqlMapSession().close();
>     return ds;
>     }
>   But I don't think that is a right way, because maybe the session is not a new one,
we can't simply close it.
> Thanks,
> Luyu Cai

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message