-->
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.  [ 4 posts ] 
Author Message
 Post subject: Use C3P0 in web application
PostPosted: Wed Nov 14, 2007 2:47 am 
Newbie

Joined: Tue Nov 13, 2007 7:25 am
Posts: 8
Location: Bhubaneswar
I'm using Struts & Hibernate in my project. But the problem comes when I'm trying to deploy the project into our Server & access it by more than 100 people simultaneously. Its the case of failure of pooling.

After that I've tried to implement C3P0 connection Pooling. But the doubt is how can I implement C3P0 with Struts & Hibernate in my Web application.

When using simple DBCP Connection Pooling with StrutsDAO design pattern we need to initialize that in our custom ActionServlet class which extends ActionServlet of Struts.

In Hibernate I've clubbed the C3P0 codes into hibernateCfg.xml file. But how to initialize that ???? How can it handle the pooling ???

Any views, any suggestions are widely appreciable.... So members please help.....

_________________
Regards
Lalit Narayan Mishra


Top
 Profile  
 
 Post subject: Come on dudes.....
PostPosted: Fri Nov 16, 2007 12:30 am 
Newbie

Joined: Tue Nov 13, 2007 7:25 am
Posts: 8
Location: Bhubaneswar
Any one solve this......

_________________
Regards
Lalit Narayan Mishra


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 16, 2007 5:39 am 
Newbie

Joined: Thu Nov 15, 2007 3:17 am
Posts: 19
Hibernate recognizes C3PO as connection pool by just checking the hibernate config for existence of C3PO properties. IIRC its c3p0.max_size, which triggers the activation.

So you don't have to initialize it in your source code. You just have to configure it + get the C3PO jar to the classpath.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 17, 2007 12:31 am 
Newbie

Joined: Tue Nov 13, 2007 7:25 am
Posts: 8
Location: Bhubaneswar
But how can the Web application know that there is a connection pool attached to Hibernate !!!! How can it create the pool & how will we manage the pool ????


Anyone please reply.......

_________________
Regards
Lalit Narayan Mishra


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

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.