Skip to content
This repository has been archived by the owner on Jul 9, 2018. It is now read-only.

Move from c3p0 to Apache Commons DBCP? #219

Closed
overholt opened this issue Jan 31, 2011 · 9 comments
Closed

Move from c3p0 to Apache Commons DBCP? #219

overholt opened this issue Jan 31, 2011 · 9 comments

Comments

@overholt
Copy link

Hi,

Some of us are trying to get Etherpad packaged for Fedora. One of the dependencies that we're having trouble with is c3p0. It looks like c3p0 only builds against Java 1.5 and we would like to use OpenJDK which is 1.6. I tried building c3p0 with gcj (which has GNU Classpath which is at 1.5) but ran into some issues with their javax.sql compatibility.

Is there any chance of etherpad moving to use Apache Commons DBCP instead of c3p0?

http://commons.apache.org/dbcp/

Thanks,

Andrew Overholt

@sesam
Copy link
Contributor

sesam commented Jan 31, 2011

c3p0 is LPGL, latest release was in 2007, so might anyways be dead.
DBCP is in Debian and Ubuntu http://packages.ubuntu.com/source/lucid/libs/libcommons-dbcp-java

So, patches welcome... :)
Perhaps http://community.jboss.org/wiki/HowToconfiguretheC3P0connectionpool is useful in understanding the existing c3p0 code.

@overholt
Copy link
Author

So you're saying you'd like help porting to DBCP? I'll see if I can drum up some help :) DBCP is in Fedora, too, FWIW.

@cjb
Copy link
Contributor

cjb commented Feb 1, 2011

Even if you get it to compile on OpenJDK (I thought I'd done so in the past..), etherpad doesn't run under OpenJDK; it crashes immediately. So, heads up on that too.

@ijuma
Copy link

ijuma commented Feb 1, 2011

Any more details regarding the crash? For instance, what was the OpenJDK version and was it a JVM crash or some library issue?

@cjb
Copy link
Contributor

cjb commented Feb 2, 2011

Sorry, I have no details. It's easy to reproduce by compiling etherpad under Sun Java and then trying to start it using OpenJDK.

Our old FAQ entries/mailing list posts mentioned this and might well have included a paste of the error message.

@sesam
Copy link
Contributor

sesam commented Feb 2, 2011

It seems that c3p0 is imported in one single place in infrastructure/net.appjet.ajstdlib/sqlbase.scala: import com.mchange.v2.c3p0._;
I'll leave this to scala-literate people to judge if it's easy to replace in there or not.

@pedalpoweredsoftware
Copy link

Here's a good discussion of c3p0, DBCP, and the alternatives:
http://stackoverflow.com/questions/520585/connection-pooling-options-with-jdbc-dbcp-vs-c3p0

@sesam
Copy link
Contributor

sesam commented Feb 4, 2011

@pedalpoweredsoftware Thanks, that makes it clear that DBCP is still to be avoided as the plague. BoneCP from http://jolbox.com/ seems to be a drop-in replacement for c3p0 and also with much better performance: http://jolbox.com/dynamic-benchmark.html
Who's up to testing BoneCP asap? Latest version 0.7 announcement: http://forum.jolbox.com/viewtopic.php?f=3&t=151
Also in 0.7 release notes: Changed license to Apache v2.0 -- so should be painless for apache-supporters to use this one :) Packaging though?

@sesam
Copy link
Contributor

sesam commented Feb 4, 2011

Also, choosing BoneCP means we need another 2 packages:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants