Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

web container in distributed enviornment

 
Joshua Antony
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Application Developers writing distributed applications should be aware that since the container may run in more than one Java virtual machine, the developer cannot depend on static variables for storing an application state. They should store such states using an enterprise bean or a database.

Above is from servlet spec SRV.7.7.2 Distributed Environments.

I guess they are referring to clustering. But practically, are there many containers that are made to run on more than 1 VM ?

Any way if this is the case then the usage of static variables for storing an application state is not only harmful for distribute applications but for also applications that are not distributed, isn't it?
 
Vyas Sanzgiri
Ranch Hand
Posts: 686
Chrome Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have used static variables for app context with good effect
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic