Multiple WARs using Hibernate (with c3p0 connection pool) in same app server


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 app server. 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 appserver/lib directly.

Files moved

c3p0-0.9.1.jar

mysql-connector-java-5.1.7-bin

This solved the problem.

Refer to C3P pool documentation

http://www.mchange.com/projects/c3p0/index.html

 

 

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 27 other followers

%d bloggers like this: