Weblogic jdbc连接池如何处理未完成的事务
中文社区 (MOSC)
中间件 (MOSC)
1 Replies
Last updated on July 26, 2018 This question is Answered
在客户使用weblogic jdbc connection pool时,有时候由于异常错误,或编码问题,导致业务中的事务未来得及处理(没有提交,也没有回滚)、业务便结束了,此时连接被回收到连接池,连接中的事务会被带到下一个业务中,在下一个业务提交事务时,一起处理,出现客户意料之外的结果,例如如下代码, test1.jsp中,创建了事务后,没有提交也没有回滚,连接被回收进入连接池,等到执行test2时,从连接池中取出之前存有test1中事务的连接,在提交时,test1,test2中的事务会一起提交。 这种情况给客户的业务带了不可预知的问题。
test1.jsp
-------------------
String strSQL = "insert
To view full details, sign in with your My Oracle Support Community account.
Don't have a My Oracle Support
Community account? Click to get started!
My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.Oracle offers a comprehensive and fully integrated stack of cloud applications and platform services. For more information about Oracle (NYSE:ORCL), visit oracle.com. © Oracle | Contact and Chat | Support | Communities | Connect with us | Legal Notices | Terms of Use