Synchronization does only work per-JVM. (Consider that you're synchronizing on an object: that same object cannot possibly appear in two different JVMs.) The only work-around is to do locking yourself, using some resource (like a file, a database, a servlet, or an RMI server) which is accessible from all server machines/processes. -- Bill K. > -----Original Message----- > From: Nico Wieland [mailto:wieland@netvertising.ch] > Sent: Monday, April 02, 2001 8:40 AM > To: tomcat-user@jakarta.apache.org > Subject: load balancing and synchronization > > > hi list > > if i do load balancing with tomcat (w/ mod_jk), what happens > if the two tomcat servers at the same time execute a > synchronized method? will they know that they mustn't execute > it concurrently or not? if synchronization worked only per > JVM, would there be a workaround? > > thanks, > > -nico > > > Nico Wieland > > NETVERTISING AG Agentur fuer zeitgerechte Kommunikation > Samariterstrasse 5, CH 8032 Zuerich > Telefon +41 1 267 11 11, Fax +41 1 267 11 99 > mailto:wieland@netvertising.ch http://www.netvertising.ch > >