ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "cailuyu (JIRA)" <ibatis-...@incubator.apache.org>
Subject [jira] Created: (IBATIS-198) Call "getDataSource()" of SqlMapClientImpl will cause application to hang
Date Wed, 28 Sep 2005 09:06:03 GMT
Call "getDataSource()" of SqlMapClientImpl will cause application to hang

         Key: IBATIS-198
         URL: http://issues.apache.org/jira/browse/IBATIS-198
     Project: iBatis for Java
        Type: Bug
  Components: SQL Maps  
    Versions: 2.0.9b    
 Environment: NT, Orable,JONAS
    Reporter: cailuyu
    Priority: Critical

  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();
    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.

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