my dog learned polymorphism
The moose likes Servlets and the fly likes SingleThreadModel in J2EE 1.4 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "SingleThreadModel in J2EE 1.4" Watch "SingleThreadModel in J2EE 1.4" New topic
Author

SingleThreadModel in J2EE 1.4

Shrinivas Mujumdar
Ranch Hand

Joined: Aug 27, 2004
Posts: 328
Hello Everybody,
In J2EE 1.4 SingleThreadModel is deprecated, so if i want to make my Servlet instance thread safe what kind of facility is provided?


with best regards
Shrinivas
Sharad Agarwal
Ranch Hand

Joined: Sep 11, 2002
Posts: 167
Its only depracated, it will still work. The alternative is to rewrite your code to be threadsafe. Basically try to avoid the use of instance member variables. And if there is a good reason to use them, synchronize access to them.
[ June 24, 2005: Message edited by: Sharad Agarwal ]

Alco-Haul: We move spirits.
Demented Deliberations of a Dilettante
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: SingleThreadModel in J2EE 1.4
 
It's not a secret anymore!