This week's book giveaways are in the Scala and Android forums.
We're giving away four copies each of Machine Learning Systems: Designs that scale and Xamarin in Action: Creating native cross-platform mobile apps and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

ServletContext will be replicated in case Session Replication or not  RSS feed

 
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ServletContext will be replicated in case Session Replication or not
 
kesava chaitanya
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when u deploy ur application in clustering
 
kesava chaitanya
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if i set like this servlet

getServletContext.setAttribute("example",example);

session.setAttribute("example",example);(in case of sessions as u said no problem)

but how this example object set in servletContext will be replicated while doing clustering?
 
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ServletContext is not replicated. It is the HTTPSession which is replicated when I talk of Containers that support clustering.
 
kesava chaitanya
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Pradip Bhat:
ServletContext is not replicated. It is the HTTPSession which is replicated when I talk of Containers that support clustering.



depend on the vendors whether ServletContext will be replicated or not.

in case of orionserver if u define <repicate-servlet-context="true"> in orion-web.xml then ServletContext will replicated.that class which is using ServletContext should be implemented serializable class.

in case of oracleappserver


orion-web.xml if u define <cluster-config> then ServletContext and session will be replicated .
 
This will take every ounce of my mental strength! All for a tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!