开发者

close fails on database connections (managed connection cleanup fails) in websphere 7 but not in websphere 6.1

开发者 https://www.devze.com 2022-12-26 03:57 出处:网络
I have a simple method (used in a web application through servlets) that gets a connection from a JNDI name and issues a select statement (get connection, issue select, return result, close the connec

I have a simple method (used in a web application through servlets) that gets a connection from a JNDI name and issues a select statement (get connection, issue select, return result, close the connection etc. in finally). Due to other methods in the application the connection is set as autocommit=false. 开发者_高级运维This method works normally in websphere 6.1 as well as in glassfish and weblogic. However, in websphere 7, it receives cleanup failed error when I close the connection because, it says, the connection is still in a transaction. Because I was not updating anything I did not commit or rollback the connection in this method (which can be wrong). If I add commit before closing the connection, it works. My question is why it works in websphere 6.1 (and other containers) and why not in websphere 7 ? What can be the cause of this difference ?


Please look at the Administrative Console, server settings, and the transaction service settings. The default settings differ in 7.x and 6.x.

0

精彩评论

暂无评论...
验证码 换一张
取 消