well I know how you would do it in struts...
you could have a servlet action forward, when the action was executed it could check
how many threads there were and forward appropriatly...
that's struts though....
clay
-----Original Message-----
From: Holger Blasum [SMTP:[EMAIL PROTECTED]]
Sent: Sunday, July 07, 2002 12:37 PM
To: [EMAIL PROTECTED]
Subject: Newbie: let servlet behavior depend on server load ?
Hello *,
is there any possibility to make behavior of servlets depend on the server
load, e.g.
Servlet.java:
if (current_number_of_tomcat_threads < 15) {
a_lot_of_fancy_lookups_and_slow_computations ();
} else {
just_the_most_essential_lookups_and_computations ();
}
Background: we run a site for students course subscription and it gets
overloaded at peak times (just when inscriptions are opened) but has little
load the other time. Running tomcat 4.04 standalone on jdk 1.3.1 blackdown
linux kernel 2.2.
Though this is of course would be a dirty workaround
(and a lame excuse for poor database design and coding) the answers might be
instructive for understanding how to tweak with servlets nonetheless.
Thx,
--
Holger Blasum <[EMAIL PROTECTED]> pls sign http://petition.eurolinux.org
GnuPG 1024D/995D35846FBC717E3562 against software patents in Europe!
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>