当前位置:首页 > 开发 > 数据库 > 正文

A C3P0Registry mbean is already registered

发表于: 2012-04-23   作者:bozch   来源:转载   浏览次数:
摘要: 在同一个tomcat下部署多个项目的时候,出现了如下警告: 2012-04-23 13:41:02,120  WARN (com.mchange.v2.c3p0.management.ActiveManagementCoordinator:56) - A C3P0Registry mbean is already registered. This probably means that

在同一个tomcat下部署多个项目的时候,出现了如下警告:
2012-04-23 13:41:02,120  WARN (com.mchange.v2.c3p0.management.ActiveManagementCoordinator:56) - A C3P0Registry mbean is already registered. This probably means that an application using c3p0 was undeployed, but not all PooledDataSources were closed prior to undeployment. This may lead to resource leaks over time. Please take care to close all PooledDataSources.

意思是C3P0Registry mbean已经被注册过啦!的确是已经在其他项目中已经对其进行了注册。

解决方案:将所有项目的将c3po和数据库驱动放到tomcat的lib下。

如果是单独一个使用c3p0的项目放在tomcat下,打出的日志是:2012-04-23 13:48:47,289  INFO (com.mchange.v2.c3p0.C3P0Registry:204) - Initializing c3p0-0.9.1.2 [built 21-May-2007 15:04:56; debug? true; trace: 10]

英文:
        We had this problem when we were trying to deploy multiple applications within same tomcat. So it was a case of multiple class loaders within same VM.
       
        How did we solve this ?
       
        We moved the jar files from WEB-INF of each folder to the tomcat/lib directly.
       
        Files moved
       
        c3p0-0.9.1.jar
       
        mysql-connector-java-5.1.7-bin
       
        This solved the problem.
       
        We were also seeing some out of memory problems which are not happening right now.
       
        Refer to C3P pool documentation
       
        http://www.mchange.com/projects/c3p0/index.html
       
        http://www.mchange.com/projects/c3p0/index.html

A C3P0Registry mbean is already registered

  • 0

    开心

    开心

  • 0

    板砖

    板砖

  • 0

    感动

    感动

  • 0

    有用

    有用

  • 0

    疑问

    疑问

  • 0

    难过

    难过

  • 0

    无聊

    无聊

  • 0

    震惊

    震惊

编辑推荐
1 MBean
Spring MBean的官方文档路径 http://docs.spring.io/spring/docs/3.0.x/reference/jmx.html 参考文
最近在看一个开源的Cache框架,里面提到使用JMX来查看Cache的命中率以及响应时间等,于是翻了一些JM
X的概念不说了,可以管理很多组件,例子程序用了简单的bean,然后JMX注册它进行管理,JMX可以管理其
最近在看一个开源的Cache框架,里面提到使用JMX来查看Cache的命中率以及响应时间等,于是翻了一些JM
最近在看一个开源的Cache框架,里面提到使用JMX来查看Cache的命中率以及响应时间等,于是翻了一些JM
As we metioned before, JMX has three types of MBean, and the standard MBean is the simplest M
As we know, Standard MBean is easy to use and implement, but it requires that the MBean inter
The second MBean I want to bring in is the Dynamic MBean, the main purpose of using Dynamic M
JMX(JAVA Management Extensions)技术是java5的新特性,它提供一种简单,标准的方式去管理应用程
假设我们有一个叫MainConfig 的配置类要需要经常进行改动,那么我们就把它写成一个MBean。 1、 Main
版权所有 IT知识库 CopyRight © 2009-2015 IT知识库 IT610.com , All Rights Reserved. 京ICP备09083238号