Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlets

 
kesavareddy evuri
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if impliment single thread model is depriciated in servlets what is the alternate to that
 
Mani Ram
Ranch Hand
Posts: 1140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The alternate is obviously the Multi-threaded model. Unfortunately, the Servlet container can't help you in this model as it did in case of Single threaded model. You need to make your application thread safe, by the traditional way - protect the shared resources (if any) yourself.
 
Vicky Pandya
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by kesavareddy evuri:
if impliment single thread model is depriciated in servlets what is the alternate to that


use synchronized blocks only for the resources, code you wish you to protect.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65118
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please read this with regards to naming your topics.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic