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

Reply via email to