• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Object Pool in Tomcat

 
Jaz Chana
Ranch Hand
Posts: 34
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

Simple request, but I'm sure the solution isn't so simple. I have a class that handles connections to another application that I am using. I call the app from my web application for every request that comes through. Now I wanted to create an object pool for this class so I dont have to create and destroy connections on every request, thus improving performance. Although I know how to use connection pooling with database connections I dont know how to create a generic object pool with tomcat. I am currently working through a generic object pool design pattern example. My question is, how do I configure tomcat to use a pool of any object type? Are there any examples of using generic object pools with tomcat on the net?

Cheers
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Crossposted: http://forums.sun.com/thread.jspa?threadID=5355927&tstart=0
Read this: http://faq.javaranch.com/java/BeForthrightWhenCrossPostingToOtherSites
[ December 17, 2008: Message edited by: Bauke Scholtz ]
 
Joe Ess
Bartender
Posts: 9214
9
Linux Mac OS X Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Object pooling is now a serious performance loss for all but the most heavyweight of objects, and even then it is tricky to get right without introducing concurrency bottlenecks


Java theory and practice: Urban performance legends, revisited
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic