Therefore, multithreaded programs are often nondeterministic, meaning their output can change even if the input does not. This is a main reason that multithreaded programs are more difficult to test and debug. Figure 7.3 shows two possible orders of execution, but there are many, many more. ...
As a consequence, each Servlet that invokes the raiseMe() method on the singleton SessionBean would raise the counter, meaning possibly every call to the server would raise the counter and not each particular call for a particular session....