generic pool mysql_Tomcat, JOTM and MYSQL - Generic Pool Cleanup — oracle-tech

在使用Tomcat 5、JOTM和MySQL时遇到问题,当应用程序静置10分钟后,GenericPool进行清理操作导致连接关闭,引发致命错误。错误显示连接在应用明确关闭后无法进行操作,且连接似乎从未从池中清除,导致应用无法创建新的连接。使用的组件包括mysql-connector-java-3.0.15-ga-bin、XAPool 1.3.1和JOTM 1.4.3。寻求阻止连接过期的方法。
摘要由CSDN通过智能技术生成

I am experiencing problems with Tomcat 5 and MySQL and JOTM.

When I run tomcat using the org.objectweb.jndi.DataSourceFactory Factory everything runs fine, but if I leave the application for 10 minutes, the GenericPool.cleanup occurs and seems to cleanup my connections with fatal consequences :

2005-04-11 09:24:45,398 xapool INFO - GenericPool:cleanUp less than minSize obje

cts in the pool min=2 max=50 count=0

2005-04-11 09:24:45,438 xapool INFO - GenericPool:cleanUp done min=2 max=50 coun

t=2

2005-04-11 09:25:47,638 xapool ERROR - StandardXADataSource:getFreeConnection ER

ROR: Failed while autocommiting a connection: java.sql.SQLException: No operatio

ns allowed after connection closed.

Connection was closed explicitly by the application at the following location:

** BEGIN NESTED EXCEPTION **

java.lang.Throwable

STACKTRACE:

java.lang.Throwable

at com.mysql.jdbc.Connection.close(Connection.java:1119)

at org.enhydra.jdbc.standard.StandardXAConnection.close(StandardXAConnec

tion.java:150)

at org.enhydra.jdbc.pool.StandardPoolDataSource.expire(StandardPoolDataS

ource.java:235)

at org.enhydra.jdbc.pool.GenericPool.removeUnlockedObject(GenericPool.ja

va:346)

at org.enhydra.jdbc.pool.GenericPool.cleanUp(GenericPool.java:545)

at org.enhydra.jdbc.pool.PoolKeeper.run(PoolKeeper.java:53)

at java.lang.Thread.run(Thread.java:534)

** END NESTED EXCEPTION **

Mon Apr 11 09:25:47: Error : SQL error on statement select * from test_table where id = ?

Mon Apr 11 09:25:47: Error : No operations allowed after connection closed.

Connection was closed explicitly by the application at the following location:

** BEGIN NESTED EXCEPTION **

java.lang.Throwable

STACKTRACE:

java.lang.Throwable

at com.mysql.jdbc.Connection.close(Connection.java:1119)

at org.enhydra.jdbc.standard.StandardXAConnection.close(StandardXAConnec

tion.java:150)

at org.enhydra.jdbc.pool.StandardPoolDataSource.expire(StandardPoolDataS

ource.java:235)

at org.enhydra.jdbc.pool.GenericPool.removeUnlockedObject(GenericPool.ja

va:346)

at org.enhydra.jdbc.pool.GenericPool.cleanUp(GenericPool.java:545)

at org.enhydra.jdbc.pool.PoolKeeper.run(PoolKeeper.java:53)

at java.lang.Thread.run(Thread.java:534)

** END NESTED EXCEPTION **

Mon Apr 11 09:25:47: Error : SQL error on statement select * from test_table

where id_1 = ?

Mon Apr 11 09:25:47: Error : No operations allowed after connection closed.

Connection was closed explicitly by the application at the following location:

** BEGIN NESTED EXCEPTION **

java.lang.Throwable

STACKTRACE:

java.lang.Throwable

at com.mysql.jdbc.Connection.close(Connection.java:1119)

at org.enhydra.jdbc.standard.StandardXAConnection.close(StandardXAConnec

tion.java:150)

at org.enhydra.jdbc.pool.StandardPoolDataSource.expire(StandardPoolDataS

ource.java:235)

at org.enhydra.jdbc.pool.GenericPool.removeUnlockedObject(GenericPool.ja

va:346)

at org.enhydra.jdbc.pool.GenericPool.cleanUp(GenericPool.java:545)

at org.enhydra.jdbc.pool.PoolKeeper.run(PoolKeeper.java:53)

at java.lang.Thread.run(Thread.java:534)

** END NESTED EXCEPTION **

2005-04-11 09:34:45,441 xapool INFO - GenericPool:cleanUp less than minSize obje

cts in the pool min=2 max=50 count=1

2005-04-11 09:34:45,451 xapool INFO - GenericPool:cleanUp done min=2 max=50 coun

t=2

It seems that the connection expires and is never cleared from the pool. Is there a way to stop the connections from expiring?

The application never creates a new connection after this has occured.

I am using:

mysql-connector-java-3.0.15-ga-bin

XAPool 1.3.1

JOTM 1.4.3

Any Help would be apprecitated.

0

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值