• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to move a ServletContext Object from 1 JVM to other?

 
Angad Kn
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I just had a question crossing my mind, so thought of discussing with you guys.

In a distributed environment when a web-app is deployed on many servers then, how do the containers manage to pass the Context Variables across Servers? We all know that each JVM has its own Context and it is not shared across. So if there is a need to send context attributes across then, how can that be achieved?

I am aware that session objects can be shared across but was curious about Context Objects.

If anyone knows about it, please reply.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The servlet context gets created whenever and wherever the web app is started. There is no need (and no way) to transfer it across servers.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!