`
meiping
  • 浏览: 47711 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

Hibernate在Resin下部署多个c3p0数据源

    博客分类:
  • Java
阅读更多

环境:

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取各不相同的名称

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics