Mock tests, Interview questions, Tutorials and Tech news
 
 
Home > Programming / tutorials > Multiple webapps using c3p0 connection pool on same server

Multiple webapps using c3p0 connection pool on same server

September 6th, 2010 Leave a comment Go to comments

Regarding this error message

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.

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

Be Sociable, Share!
  1. No comments yet.
  1. No trackbacks yet.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes