You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "cailuyu (JIRA)" <ib...@incubator.apache.org> on 2005/09/28 11:06:03 UTC

[jira] Created: (IBATIS-197) Call "getDataSource()" of SqlMapClientImpl will cause application to hang

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


Hi
  
  We found a system-hanging problem in our application.
  In our application, we need the DataSource, so we call  getDataSource() from SqlMapClient interface.
  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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (IBATIS-197) Call "getDataSource()" of SqlMapClientImpl will cause application to hang

Posted by "Clinton Begin (JIRA)" <ib...@incubator.apache.org>.
     [ 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 interface.
>   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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (IBATIS-197) Call "getDataSource()" of SqlMapClientImpl will cause application to hang

Posted by "Clinton Begin (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-197?page=all ]
     
Clinton Begin closed IBATIS-197:
--------------------------------

    Resolution: Duplicate

> 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

>
> Hi
>   
>   We found a system-hanging problem in our application.
>   In our application, we need the DataSource, so we call  getDataSource() from SqlMapClient interface.
>   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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Reopened: (IBATIS-197) Call "getDataSource()" of SqlMapClientImpl will cause application to hang

Posted by "Clinton Begin (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-197?page=all ]
     
Clinton Begin reopened IBATIS-197:
----------------------------------


> 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
>      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 interface.
>   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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira