Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Single Thread Model  RSS feed

 
Siddharth Bhargava
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please explain me the concept of Single Thread Model with examples. Thanks a lot.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This topic comes up quite a bit here.
If you search this forum, you'll find plenty of discussion about the deprecated SingleThreadModes (which should no longer be used).
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or even better, have a look at the API, which describes the desired effect and the reason why this interface is deprecated (ie scheduled for removal)
 
Remko Strating
Ranch Hand
Posts: 893
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's simple the Single Thread Model is bad....

So don't use it.

It doesn't solve the problem and has a poor performance.
 
Amit Kumargupta
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do not implement the Single Thread Model interface. Beacuse Web container to create multiple servlet instances, one per user. In an application of any size, this could cause severe performance problems.
 
rushi kumar
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you implement SingleThreadModel interface the server will create multiple instances of servlet(one instance per each request),so its is not advisable to implement this interface.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!