• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

C3P0 Connections are not released on undeply

 
Suresh Khant
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am using c3p0 with the hibernate for connection pooling ,

I have noticed that when i undeploy the application the database connections are not released , to release them i need to restart the application server which is jboss 7

here is my C3P0 configuration




my pom file contains




Are my settings are right ? is there any property to release the created database connections , is C3P0 the best choice to manage the connection pool ?
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you testing that the connections aren't released?

The file you posted looks like a hibernate configuration file. Is that right? If yes, how are you using Hibernate in your application? Are you setting up the entitymanagers yourself?
 
Suresh Khant
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Pai , Thanks for your reply ,

How are you testing that the connections aren't released?

By listing the number of database connections using the mysql command
show processlist;

executing this command after deploying of the application( and running it ) and after undeploy of the application


The file you posted looks like a hibernate configuration file. Is that right? If yes, how are you using Hibernate in your application?

yes it is hibernate configuration file along with C3P0 configuration ,

part of Hibernate configuration file :



I am using hibernate as the following

Hibernateutil class



Example to save entity




Are you setting up the entitymanagers yourself

Frankly i dont know what do you mean by entitymanagers , but i ll check that
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic