If a servlet implements the SingleThreadModel interface then will the instance variable of the servlet be thread-safe? TIA - Chris
Phil Hanna
Ranch Hand
Joined: Apr 05, 2001
Posts: 118
posted
0
Yes, but it's almost always a poor design to do this. Why do you need instance variables to be persistent? An HTTP session is a much cleaner way to do this. SingleThreadModel does not scale well. ------------------ Phil Hanna Sun Certified Programmer for the Java 2 Platform Author of : JSP: The Complete Reference Instant Java Servlets
Phil Hanna<BR>Sun Certified Programmer for the Java 2 Platform<BR>Author of :<BR><A HREF="http://www.amazon.com/exec/obidos/ASIN/0072127686/electricporkchop/107-3548162-1137317" TARGET=_blank rel="nofollow">JSP: The Complete Reference</A><BR><A HREF="http://www.amazon.com/exec/obidos/ASIN/0072124253/electricporkchop/107-3548162-1137317" TARGET=_blank rel="nofollow">Instant Java Servlets</A>