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-198) Call "getDataSource()" of SqlMapClientImpl will cause application to hang
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
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] Commented: (IBATIS-198) Call "getDataSource()" of SqlMapClientImpl will cause application to hang
Posted by "cailuyu (JIRA)" <ib...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/IBATIS-198?page=comments#action_12331078 ]
cailuyu commented on IBATIS-198:
--------------------------------
that is how we changed the method "public DataSource getDataSource()" now:
public DataSource getDataSource() {
DataSource ds = null;
if( localSqlMapSession.get()!=null ){
ds = getLocalSqlMapSession().getDataSource();
getLocalSqlMapSession().close();
}
else{
ds = getLocalSqlMapSession().getDataSource();
}
return ds;
}
> 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
>
> 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-198) 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-198?page=all ]
Clinton Begin closed IBATIS-198:
--------------------------------
Fix Version: 2.2.0
Resolution: Fixed
> 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
> Assignee: Clinton Begin
> Priority: Critical
> 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] Reopened: (IBATIS-198) 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-198?page=all ]
Clinton Begin reopened IBATIS-198:
----------------------------------
> 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
> Assignee: Clinton Begin
> Priority: Critical
> 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-198) 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-198?page=all ]
Clinton Begin closed IBATIS-198:
--------------------------------
Resolution: Fixed
Assign To: Clinton Begin
Thanks for the detailed report.
> 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
> Assignee: Clinton Begin
> Priority: Critical
>
> 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