Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Threading issue in serlets - Urgent  RSS feed

 
babu krishnan
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have a typical scenario.
I have a screen for logingout users for an application.The UI for that has 10 user name and passwords field arranged in rows.
Iam using MVC architecture.
If a user logs out after entereing password and clicks logout button. i have to call my controller servlet and which in turn calls the respective class for loging him out.
My problem is, the screen has to such name and pwd fields.
If these 10 users logs out with a gap of 3 sec each in the same UI, do i need to handle using thread. If such is the case how should i do that.
All your suggestions are greatly appreciated. Plz reply with code blocks if you can
Thanx in advance
K.BAbu
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Each request gets its own Thread - the only thing you have to worry about is synchronizing access to any object that might have to deal with multiple threads from the different requests.
Bill
 
Juanjo Bazan
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your application is little or is designed for just a few users, you could implement the SingleThreadModel interface to solve your syncr issues...
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!