aspose file tools*
The moose likes Servlets and the fly likes Object Pool in Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Object Pool in Tomcat" Watch "Object Pool in Tomcat" New topic
Author

Object Pool in Tomcat

Jaz Chana
Ranch Hand

Joined: Feb 19, 2008
Posts: 34
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

Joined: Oct 08, 2006
Posts: 2458
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

Joined: Oct 29, 2001
Posts: 8971
    
    9

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


[How To Ask Questions On JavaRanch]
 
 
subject: Object Pool in Tomcat