• Post Reply Bookmark Topic Watch Topic
  • New Topic

Connection Pooling in Non-Web App

 
Kim Kantola
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
Thanks,
Kim
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Kim Kantola
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
Kim
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!