`
xupo
  • 浏览: 214880 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

C3PO Exception - CLOSE BY CLIENT

阅读更多

We are running a standalone application with Spring. We use a MySQL database. The datasource that has been configured is the "com.mchange.v2.c3p0.ComboPooledDataSource" from C3PO At regular interval :

 

  com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0 DEBUG 2011-04-01 10:27:47,009 BasicResourcePool$1DestroyResourceTask:run - Preparing to destroy resource: com.mchange.v2.c3p0.impl.NewPooledConnection@1eaf8ae
  com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0 DEBUG 2011-04-01 10:27:47,009 C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager:destroyResource - Preparing to destroy PooledConnection: com.mchange.v2.c3p0.impl.NewPooledConnection@1eaf8ae
  com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0 DEBUG 2011-04-01 10:27:47,009 GooGooStatementCache:closeAll - ENTER METHOD: closeAll( com.mysql.jdbc.JDBC4Connection@f5b5a6 )! -- num_connections: 0
  com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0 DEBUG 2011-04-01 10:27:47,009 GooGooStatementCache:closeAll - closeAll(): com.mchange.v2.c3p0.stmt.GlobalMaxOnlyStatementCache stats -- total size: 0; checked out: 0; num connections: 0; num keys: 0
  com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0 DEBUG 2011-04-01 10:27:47,010 NewPooledConnection:close - com.mchange.v2.c3p0.impl.NewPooledConnection@1eaf8ae closed by a client.
  java.lang.Exception: DEBUG -- CLOSE BY CLIENT STACK TRACE
  	at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:491)
  	at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:191)
  	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:470)
  	at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:964)
  	at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
  com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0 DEBUG 2011-04-01 10:27:47,010 C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager:destroyResource - Successfully destroyed PooledConnection: com.mchange.v2.c3p0.impl.NewPooledConnection@1eaf8ae
  com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0 DEBUG 2011-04-01 10:27:47,010 BasicResourcePool$1DestroyResourceTask:run - Successfully destroyed resource: com.mchange.v2.c3p0.impl.NewPooledConnection@1eaf8ae
  com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1 DEBUG 2011-04-01 10:27:47,017 GooGooStatementCache:checkinAll - checkinAll(): com.mchange.v2.c3p0.stmt.GlobalMaxOnlyStatementCache stats -- total size: 0; checked out: 0; num connections: 0; num keys: 0
  com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1 DEBUG 2011-04-01 10:27:47,017 C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager:acquireResource - com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager@961df6.acquireResource() returning. 
  com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1 DEBUG 2011-04-01 10:27:47,017 BasicResourcePool:trace - trace com.mchange.v2.resourcepool.BasicResourcePool@d9fe20 [managed: 2, unused: 2, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@108d7cf)
  com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1 DEBUG 2011-04-01 10:27:47,017 BasicResourcePool:decrementPendingAcquires - decremented pending_acquires: 0

 

 

The implementation of close of NewPooledConnection is indeed a bit exotic.

public synchronized void close() throws SQLException
{
  close(null);
}

private void close(Throwable cause) throws SQLException
{
  ....
if(cause == null)
{
 invalidatingException = NORMAL_CLOSE_PLACEHOLDER;
 if(logger.isLoggable(MLevel.FINEST))
 logger.log(MLevel.FINEST, this + " closed by a client.", new Exception("DEBUG -- CLOSE BY CLIENT STACK TRACE"));
  ...
}

 

Indeed, there is nothing to worry about.
Just odd log statements sprinkled throughout the C3P0 codebase.
Raise the loglevel to INFO and these statemens will not appear anymore.
Have a nice holiday and happy coding.

 

 

分享到:
评论

相关推荐

    ESP-C3-32S-Kit 开发板规格书

    ESP-C3-32S-Kit 是一款基于 Espressif 系统的开发板,专为 STM32 和 ARM 架构的嵌入式硬件开发者设计。这款开发板旨在简化 IoT(物联网)应用的开发过程,它配备了 ESP-C3-32S 芯片,该芯片是 Espressif 公司的一款...

    java中c3p0数据库连接池使用方法(c3p0-config.xml+c3p0-0.9.2-pre1.jar+JdbcPool_c3p0.java)

    java中c3p0数据库连接池使用方法(c3p0-config.xml+c3p0-0.9.2-pre1.jar+JdbcPool_c3p0.java),里面包含了c3p0-0.9.2-pre1.jar、以及配置文件:c3p0-config.xml、以及一个c3p0数据库连接池工具类(只有简单的两个方法...

    C3p0c3p0-0.9.5.5三个包

    C3p0c3p0-0.9.5.5三个jar包使用,匹配mysql8.0等信息,包含mchange-commons-java-0.2.19.jar、c3p0-oracle-thin-extras-0.9.5.5.jar、c3p0-0.9.5.5.jar

    c3p0-0.9.1.2.jar

    C3P0地址:https://sourceforge.net/projects/c3p0/?source=navbar C3P0是一个开源的连接池。Hibernate框架,默认推荐使用C3P0作为连接池实现。 C3P0的jar包:c3p0-0.9.1.2.jar

    c3p0-0.9.2-pre1

    1. **异常处理**:c3p0提供了丰富的异常类,如`C3P0Exception`,帮助开发者识别和处理连接池相关的错误。 2. **监控**:c3p0内置了统计和监控机制,可以通过`getStatistics()`获取池的状态信息,也可以通过JMX...

    c3po-0.21.0.70所有资源包

    **c3po** 是一个广泛使用的Java数据库连接池(JDBC Connection Pool)库,它提供了对JDBC数据库连接的管理,使得多个并发的程序能够高效地共享数据库连接,避免了频繁创建和销毁连接的开销。c3po的全称是`...

    c3p0-0.9.5.1

    C3P0是一个开源的JDBC连接池,它实现了数据源和JNDI绑定,支持JDBC3规范和JDBC2的标准扩展。标题中的"c3p0-0.9.5.1"指的是C3P0的一个特定版本,即0.9.5.1版。这个版本可能包含了对早期版本的修复、性能优化或新功能...

    c3p0数据库连接池所需jar包c3p0-oracle-thin-extras-0.9.1.2.rar

    c3p0数据库连接池所需jar包,c3p0数据库连接池所需jar包c3p0-oracle-thin-extras-0.9.1.2、c3p0-0.9.1.2.jar、c3p0-0.9.1.2-jdk1.3.jar  1、首先在项目下创建一个文件夹,保存我们的jar包。在项目名上右击,依次...

    c3p0-0.9.5.2.jar+mchange-commons-java-0.2.12.jar

    `c3p0-0.9.5.2.jar`是c3p0的主要实现库,包含了c3p0的所有功能和类。版本号0.9.5.2表示这是c3p0的第9次重大更新,第5次次要更新,第2次修正更新。这个库提供了数据源(DataSource)实现,它是符合JDBC规范的数据源...

    c3p0-0.9.5.2-API文档-中文版.zip

    赠送jar包:c3p0-0.9.5.2.jar; 赠送原API文档:c3p0-0.9.5.2-javadoc.jar; 赠送源代码:c3p0-0.9.5.2-sources.jar; 赠送Maven依赖信息文件:c3p0-0.9.5.2.pom; 包含翻译后的API文档:c3p0-0.9.5.2-javadoc-API...

    c3p0-0.9.5.2(含配置文件)连接池.zip

    这是c3p0-0.9.5.2(含配文件)连接池技术的资源,里面含c3p0-0.9.5.2.jar包,这是c3p0数据库连接池的jar包,mchange-commons-java-0.2.11.jar是数据库连接池的依赖包,导入时,要一同导入,否则会产生错误。...

    JavaEE源代码 c3p0-0.9.0

    JavaEE源代码 c3p0-0.9.0JavaEE源代码 c3p0-0.9.0JavaEE源代码 c3p0-0.9.0JavaEE源代码 c3p0-0.9.0JavaEE源代码 c3p0-0.9.0JavaEE源代码 c3p0-0.9.0JavaEE源代码 c3p0-0.9.0JavaEE源代码 c3p0-0.9.0JavaEE源代码 c3p...

    c3p0-0.9.5.bin.zip

    c3p0-0.9.5.bin.zip包含: c3p0-0.9.5.jar c3p0-oracle-thin-extras-0.9.5.jar mchange-commons-java-0.2.9.jar 帮助文档 源码 等

    c3p0-0.9.5.5.bin.rar

    C3P0是一个开源的Java连接池,它实现了数据源和JNDI绑定,支持JDBC3规范和JDBC2的标准扩展。这个压缩包“c3p0-0.9.5.5.bin.rar”包含了两个核心的JAR文件以及一个配置文件,这些都是使用C3P0进行数据库连接管理时...

    c3p0-oracle-thin-extras-0.9.5.3.jar

    c3p0-0.9.5.3.bin.tgz的lib包,含有此c3p0-oracle-thin-extras-0.9.5.3.jar文件。

    数据连接jar包c3p0-0.9.1.2.jar

    《c3p0-0.9.1.2.jar:数据库连接池的高效管理》 在IT行业中,数据库连接管理是任何应用系统的基础,尤其是在处理大量并发请求时,高效的数据库连接池至关重要。c3p0-0.9.1.2.jar就是这样一个专门用于管理数据库连接...

    c3p0-0.9.5.2连接池所需jar包

    **c3p0-0.9.5.2 连接池详解** c3p0 是一个开源的 JDBC 连接池,它实现了数据源和 JNDI 绑定,支持 Jdbc3 规范和 J2EE 设计模式。在 Java 应用程序中,c3p0 提供了数据库连接的高效管理,通过复用已存在的连接来减少...

    c3p0-oracle-thin-extras-0.9.2.1

    c3p0-oracle-thin-extras-0.9.2.1

    c3p0-0.9.5.2的jar包

    c3p0-0.9.5.2jar包 数据库连接池,java学习关于mysql必不可少的一部分,C3P0是一个开源的JDBC连接池,它实现了数据源和JNDI绑定,支持JDBC3规范和JDBC2的标准扩展。目前使用它的开源项目有Hibernate,Spring等。

    c3p0-0.9.5.2.bin源码及jar包

    C3P0是一个开源的JDBC连接池,它实现了数据源和JNDI绑定,支持JDBC3规范和JDBC2的标准扩展。这个资源“c3p0-0.9.5.2.bin”包含了C3P0的源代码以及对应的jar包,这对我们深入理解C3P0的工作原理和自定义配置提供了...

Global site tag (gtag.js) - Google Analytics