Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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
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?
 
Pradeep bhatt
Ranch Hand
Posts: 8927
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 .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic