Re: Concurrency - Servlet created instances accessing static classes

2014-03-25 Thread John Smith
> You must have been fun to have as a student. > Student is a vague term. Student of which grade, which subject? Student of a trade? Student of life? Unfortunately your lack of exactness means I can't understand your joke :) (I was an even worse employee) - John

Re: Concurrency - Servlet created instances accessing static classes

2014-03-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 John, On 3/25/14, 9:58 AM, John Smith wrote: >> First terminology problem: class X isn't instantiated here, an >> object of type class X is instantiated. >> > > As Matisse once said, exactitude is not truth. This sort of hair > splitting isn't hel

Re: Concurrency - Servlet created instances accessing static classes

2014-03-25 Thread John Smith
> First terminology problem: class X isn't instantiated here, an object of > type class X is instantiated. > As Matisse once said, exactitude is not truth. This sort of hair splitting isn't helpful. Say "Class X is instantiated" to a thousand programmers and they'll understand that it means an ins

Re: Concurrency - Servlet created instances accessing static classes

2014-03-25 Thread John Smith
> > If the method is thread-safe - no issue. If it isn't thread-safe then > you have a problem. > > Mark > Thanks Mark - Clearly and succinctly explained. Best, John

Re: Concurrency - Servlet created instances accessing static classes

2014-03-24 Thread Mark Thomas
On 24/03/2014 16:08, John Smith wrote: > I should know this, but I want to confirm with smarter people on the board. > > Assume the following: > 1. Servlet receives an HTTP POST request. doPost(...) is called. > 2. doPost(..) instantiates class X with each request > 3. Class X calls a static metho

RE: Concurrency - Servlet created instances accessing static classes

2014-03-24 Thread Caldarale, Charles R
> From: John Smith [mailto:tomcat.ran...@gmail.com] > Subject: Concurrency - Servlet created instances accessing static classes > Assume the following: > 1. Servlet receives an HTTP POST request. doPost(...) is called. > 2. doPost(..) instantiates class X with each request Fi

Re: Concurrency - Servlet created instances accessing static classes

2014-03-24 Thread J Java
if you are accessing any static variables in method Y,it can cause concurrency issues. Thanks, Shailesh. On Mon, Mar 24, 2014 at 9:38 PM, John Smith wrote: > I should know this, but I want to confirm with smarter people on the board. > > Assume the following: > 1. Servlet receives an HTTP POST

Concurrency - Servlet created instances accessing static classes

2014-03-24 Thread John Smith
I should know this, but I want to confirm with smarter people on the board. Assume the following: 1. Servlet receives an HTTP POST request. doPost(...) is called. 2. doPost(..) instantiates class X with each request 3. Class X calls a static method of class Y Assuming I have no synchronization in