| Author |
Instance variables and multi-threading
|
Paulus Maessen
Greenhorn
Joined: Sep 29, 2004
Posts: 12
|
|
Hi all, I have a question about the example in the SCWCD exam study kit: On page 165, listing 10.7 shows a servlet that uses an instance variable to cache a database connection. As I understand it this is not threadsafe. Right?
|
 |
Chengwei Lee
Ranch Hand
Joined: Apr 02, 2004
Posts: 884
|
|
|
Yep, instance variables are *never* threadsafe.
|
SCJP 1.4 * SCWCD 1.4 * SCBCD 1.3 * SCJA 1.0 * TOGAF 8
|
 |
 |
|
|
subject: Instance variables and multi-threading
|
|
|