File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Java SE 8 for the Really Impatient
this week in the
Web Component Certification (SCWCD/OCPJWCD)
Instance variables and multi-threading
Joined: Sep 29, 2004
Sep 30, 2004 06:22:00
I have a question about the example in the SCWCD exam study kit:
On page 165, listing 10.7 shows a
that uses an instance variable to cache a database connection. As I understand it this is not threadsafe.
Joined: Apr 02, 2004
Oct 01, 2004 02:27:00
Yep, instance variables are *never* threadsafe.
SCJP 1.4 * SCWCD 1.4 * SCBCD 1.3 * SCJA 1.0 * TOGAF 8
I agree. Here's the link:
subject: Instance variables and multi-threading
Is final variable i:final int i=0;on stack or heap?
Question about inheritance
Help with recursion
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014