-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: hibernate exceeds connection pool size defined in c3p0
PostPosted: Tue May 12, 2009 11:50 pm 
Newbie

Joined: Tue Sep 23, 2008 4:44 pm
Posts: 15
I have an application running in weblogic that uses c3p0 connection pooling. All the session.close() calls are in finally blocks in the application. When the app runs under load, the database connections exceed the max defined number in the connection pool (eg: connection shown to database server are 275, but max defined limit is 20).

Code:
<property name="hibernate.connection.url">
      jdbc:oracle:thin:@<host>:1521:<sid>
   </property>
   <property name="hibernate.connection.username">user</property>
   <property name="hibernate.connection.password">passwd</property>

     <property name="hibernate.c3p0.min_size">5</property>
    <property name="hibernate.c3p0.max_size">20</property>
    <property name="hibernate.c3p0.timeout">1800</property>
    <property name="hibernate.c3p0.max_statements">50</property>


     // create session
     sessionFactory = cfg.buildSessionFactory();
     Session session = sessionFactory.openSession();


Questions: how does the app exceed the max connections in pool (goes up to appx 300)? Would using weblogic datasource instead help?

Appreciate any responses.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.