gpt4 book ai didi

hibernate - 多个具有 c3p0 配置的应用程序发出警告

转载 作者:行者123 更新时间:2023-12-02 20:14:47 26 4
gpt4 key购买 nike


我在一个tomcat下有两个Web应用程序。两者都使用 hibernate 3.2.1 和 c3p0 0.9.1.2。当部署第二个应用程序时,我总是收到以下警告消息。
Tomcat:apache-tomcat-6.0.28

WARN 2010-11-06 19:04:37,270 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(部署多个 Web 应用程序时、重新加载给定的 Web 应用程序时),我的建议是将 C3P0 JAR(和 JDBC 驱动程序)从Webapp 类加载器 (WebappX/WEB-INF/lib) 到 Common 类加载器 ($TOMCAT_HOME/lib) .

关于hibernate - 多个具有 c3p0 配置的应用程序发出警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4113759/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com