Mock tests, Interview questions, Tutorials and Tech news
 
 

Archive

Posts Tagged ‘c3p pool configuration’

Configuring c3p0 connection pool with maven

December 29th, 2010 Vinay No comments

Let us say you want to configure c3p0 connection pool in your application through maven.

Here is the definition you need to add in pom.xml

<dependency>
<groupId>c3p0</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.1</version>
</dependency>

If you would like to see  how to configure c3po connection pool in Spring see this post Using connection pool with MYSQL in Spring applicationContext.xml

Multiple webapps using c3p0 connection pool on same server

September 6th, 2010 Vinay No 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

Spring Application and Jforum Integration – Sharing same c3p pool

August 3rd, 2009 smitha No comments

I hope you have gone through my previous blog about Jforum integration. There I have explained integration of Jforum into a spring / jsf application.

After integration the main problem was the database connectivity. My spring application was using a c3p pool datasource and the Jforum was also creating c3p pool and datasources to connect to db. As I had all tables (both Jforum and my application tables) in same db, it was not appropriate to have 2 pools for same db by same application.

Read more…

Get Adobe Flash playerPlugin by wpburn.com wordpress themes