shangban 发表于 2017-2-20 12:24:13

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取各不相同的名称
页: [1]
查看完整版本: Hibernate在Resin下部署多个c3p0数据源