Re: threads vs. servlets

2015-03-11 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 David, On 3/10/15 8:15 PM, David Bullock wrote: On 11 March 2015 at 04:43, Christopher Schultz ch...@christopherschultz.net wrote: Basically, making a servlet threadsafe only requires you to avoid any non-threadsafe class members in the

Re: threads vs. servlets

2015-03-10 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Carl, Others have already responded, but I figured I'd add my two cents, too. On 3/10/15 11:25 AM, Carl Dreher wrote: If I write a servlet such as the above, is there ever only once instance of it running? Don't confuse objects with threads.

Re: threads vs. servlets

2015-03-10 Thread Neven Cvetkovic
Hey Carl, On Tue, Mar 10, 2015 at 11:25 AM, Carl Dreher focus...@arn.net wrote: If I write a servlet such as the above, is there ever only once instance of it running? Don't confuse objects with threads. There is one instance of a particular servlet, but many threads may be executing in

Re: threads vs. servlets

2015-03-10 Thread Carl Dreher
If I write a servlet such as the above, is there ever only once instance of it running? Don't confuse objects with threads. There is one instance of a particular servlet, but many threads may be executing in it concurrently, with each thread processing a separate request. I understand

Re: threads vs. servlets

2015-03-10 Thread Kaydell Leavitt
Unsubscribe. Please?! -- Kaydell kayd...@yahoo.com On Mar 10, 2015, at 9:25 AM, Carl Dreher focus...@arn.net wrote: If I write a servlet such as the above, is there ever only once instance of it running? Don't confuse objects with threads. There is one instance of a particular

RE: threads vs. servlets

2015-03-10 Thread Caldarale, Charles R
From: Carl Dreher [mailto:focus...@arn.net] Subject: Re: threads vs. servlets If I write a servlet such as the above, is there ever only once instance of it running? Don't confuse objects with threads. There is one instance of a particular servlet, but many threads may

Re: threads vs. servlets

2015-03-10 Thread David Bullock
On 11 March 2015 at 04:43, Christopher Schultz ch...@christopherschultz.net wrote: Basically, making a servlet threadsafe only requires you to avoid any non-threadsafe class members in the servlet itself... Since we're tossing pennies, I've often wondered how the app-server achieves the