This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
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

Using SingleModel Interface vs Normal , Static vs SerlvetContext  RSS feed

 
Sanjay Ra
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

I am using the normal Serlvet life cycle with a serlvet that has some static initialization data
(During init).
Should i be using the serlvet Context for this with the singleModel interface instead?

thanks
Sanjay
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

The SingleThread Interface is deprecated as per Servlet 2.4 specification. Though you use the SingleThread model, proper sync. is required. If the Servlet is running in distributed environment there may be ServletContext Instance per JVM. So it is always safe to sync. properly using any stratrgies.

Thank you.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!