Hi Simon I have my specific reason on why I need to do this. I call the Oracle 8i JServer EJB instances from my servlet. IF you familiar on how Oracle JVM works. It's run in a session that doesn't support threading. thus all execution in this session is sequential. Say if I want to call my ejb instances from servlets, I control the EJB (Session) creation in my init() of the servlets. effectibely, the problem is multiple servlet threads shares one Oracle EJB session, thus a bottleneck in the EJB session level. The way I thought to control is to create a pool of EJB instances per servlet(The memory is cheap to consume within Oracle JVM). say 20 EJB instances created in init() of the servelt call. and if I also control the number of threads accessing the servlet, thus this bottleneck problem is resolved. Any comments are very welcome. Cheers Jay >From: Kitching Simon <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> >Subject: RE: limit threads per servlet in Tomcat >Date: Fri, 8 Dec 2000 17:19:28 +0100 > >Hi Jay, > >Why would you want to do this? > >As far as I can see, having one object with 21 threads >is *more* efficient than 21 threads distributed across >two objects. > >If you have some kind of lock contention, then using two >objects is not going to improve this; by definition, a lock is >only required when threads need to share data. So if you have >a lock (with inter-thread contention), then you *cannot* create >two objects, as the data-sharing will then not work. > >If you don't have lock contention, then why create new >instances? This just seems to me to use up memory.... > >Is there something I'm missing ?? > >Cheers, > >Simon > > > -----Original Message----- > > From: J Y [SMTP:[EMAIL PROTECTED]] > > Sent: Friday, December 08, 2000 4:35 PM > > To: [EMAIL PROTECTED] > > Subject: limit threads per servlet in Tomcat > > > > Hi > > > > I wish to setup Tomcat to limit threads per servlet, say 20 threads to > > execute in one servlet concurrently. the 21th request would cause the > > Tomecat engine to generate a new servlet instance. > > > > Is there a way to do it. any comment appriciated. > > > > Also, what's the performance concerns. is that possible to create a pool > > of > > servelts? > > > > Thanks > > > > Jay > > >__________________________________________________________________________ > > ___________ > > Get more from the Web. FREE MSN Explorer download : > > http://explorer.msn.com _____________________________________________________________________________________ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com
