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.  [ 2 posts ] 
Author Message
 Post subject: n00b question on c3p0
PostPosted: Tue Nov 21, 2006 7:06 pm 
Newbie

Joined: Tue Nov 21, 2006 6:57 pm
Posts: 1
Hi,
I'm a sysadmin trying to get rid of an exception on c3p0 trying to load JNI libraries inside a JVM that already has them for JNDI DataSources. I skimmed docs on Google and I understood that c3p0 is alternative to a full JNDI JDBC resource. Am I correct that I should remove the c3p0 props from the hibernate config and pass my ususal JNDI resource ref?

Thanks,
e


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 22, 2006 7:48 pm 
C3P0 Developer
C3P0 Developer

Joined: Tue Jan 06, 2004 8:58 pm
Posts: 145
c3p0 doesn't use JNI. If you are seeing a JNI-related Exception, it has to do with your JDBC driver.

c3p0 is a highly concurrent JDBC ConnectionPooling library that whose pools are exposed via standard JNDI-bindable JDBC DataSources. It can be used to wrap "traditional" DriverManager-based JDBC drivers into pooled, bindable DataSources, or to pool Connections from DataSource-based JDBC drivers.

hibernate can be get its Connections lots of different ways. Usually, if your application server or JDBC has Connection-pooling built in, a third-party pool like c3p0 is something you'd try mainly if your disappointed with "native" pool's performance. If your driver or app server do not pool internally, one way or another you'll need a library like c3p0 (or proxool, dbcp, primrose... there are lots out there) interposed between hibernate and your database if you want decent performance,

smiles,
Steve


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.