怎么会出现“关闭的连接”?

enjoyjava 2003-12-03 05:50:17
Tomcat 4.1下通过jsp连接oracle数据库,访问量大时候,经常出现“javax.servlet.ServletException: 关闭的语句”错误信息,刷新页面后就运行正常,这是怎么回事呢?需要如何调整配置来解决该问题?
多谢!
...全文
37 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
zcjl 2004-02-16
  • 打赏
  • 举报
回复
http://expert.csdn.net/Expert/topic/2731/2731837.xml?temp=.683468
好像是类似的问题哦
我现在是知其然,不知其所以然
所以心里没底,不知什么时候就会又出问题了
floweryz 2004-02-16
  • 打赏
  • 举报
回复
你建立一个数据库连接池就好了,上次数据没有访问完,下次的就到了,所以会出现这种情况
along603 2004-02-16
  • 打赏
  • 举报
回复
就是连接关了,你还想用,估计可能是循环的时候写错了
zql2002 2004-02-16
  • 打赏
  • 举报
回复
up
kissdavid 2004-02-16
  • 打赏
  • 举报
回复
连接提前关闭,或是关闭了二次
好好看看代码
应该是这个问题!
willway 2004-02-16
  • 打赏
  • 举报
回复
tomcat下有文档:Tomcat 4.1\webapps\tomcat-docs\jndi-datasource-examples-howto.html
里面说:Random Connection Closed Exceptions
These can occur when one request gets a db connection from the connection pool and closes it twice. When using a connection pool, closing the connection just returns it to the pool for reuse by another request, it doesn't close the connection. And Tomcat uses multiple threads to handle concurrent requests.
willway 2004-02-16
  • 打赏
  • 举报
回复
你看看这篇文章
http://expert.csdn.net/Expert/topic/2431/2431018.xml?temp=.8884088
不过最后好像还是没有解决

我也遇到相同的问题,解决不了,郁闷中……

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧