我是靠谱客的博主 活泼大米,这篇文章主要介绍Hibernate在Resin下部署多个c3p0数据源,现在分享给大家,希望可以做个参考。

环境:

resin3.x

hibernate3

c3p0-0.9.1

 

单纯的使用hibernate,没有spring来配合,如果同一个resin下配置了多个c3p0连接池,则会报错,错误信息如下:

A C3P0Registry mbean is already registered. This probably means that an application using c3p0 was undeployed, but not all PooledDataSources were close
d prior to undeployment. This may lead to resource leaks over time. Please take care to close all PooledDataSources.

 

解决的方法是在hibernate的配置文件中给session-factory取各不相同的名称

最后

以上就是活泼大米最近收集整理的关于Hibernate在Resin下部署多个c3p0数据源的全部内容,更多相关Hibernate在Resin下部署多个c3p0数据源内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(71)

评论列表共有 0 条评论

立即
投稿
返回
顶部