File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Connection Pooling in Non-Web App Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Storm Applied this week in the Other Open Source APIs forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Connection Pooling in Non-Web App" Watch "Connection Pooling in Non-Web App" New topic

Connection Pooling in Non-Web App

Kim Kantola
Ranch Hand

Joined: May 17, 2001
Posts: 275
Hi All,
I have been googling connection pooling, and most of the info I am finding is regarding making a connection for a web app. I have a stand alone java app, so not using Apache, tomcat, etc. Are there any non web-app connection pool packages ?
Also, is using the DataSource object just something for web apps?
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

Well, you only really need connection pooling from multiuser applications, and a web application is probably the most common example of that. Can't think why a desktop application would necessarily need pooling.

You might look at c3p0.
[ March 19, 2007: Message edited by: Paul Sturrock ]

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Kim Kantola
Ranch Hand

Joined: May 17, 2001
Posts: 275
Oh, thanks, that makes sense. I guess I was thinking I needed pooling because my app is multi-threaded, but each thread has its own object which makes its own database connection, so I guess you are right, I wouldn't need pooling in this case.

Thanks very much,
I agree. Here's the link:
subject: Connection Pooling in Non-Web App