aspose file tools*
The moose likes Servlets and the fly likes ServletContext will be replicated in case Session Replication or not Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "ServletContext will be replicated in case Session Replication or not" Watch "ServletContext will be replicated in case Session Replication or not" New topic
Author

ServletContext will be replicated in case Session Replication or not

kesava chaitanya
Ranch Hand

Joined: Aug 15, 2001
Posts: 140
ServletContext will be replicated in case Session Replication or not
kesava chaitanya
Ranch Hand

Joined: Aug 15, 2001
Posts: 140
when u deploy ur application in clustering
kesava chaitanya
Ranch Hand

Joined: Aug 15, 2001
Posts: 140
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

Joined: Feb 27, 2002
Posts: 8919

ServletContext is not replicated. It is the HTTPSession which is replicated when I talk of Containers that support clustering.


Groovy
kesava chaitanya
Ranch Hand

Joined: Aug 15, 2001
Posts: 140
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 .
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ServletContext will be replicated in case Session Replication or not