aspose file tools*
The moose likes Servlets and the fly likes HttpServletRequest , HttpServletSession are they serializable 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 "HttpServletRequest , HttpServletSession are they serializable" Watch "HttpServletRequest , HttpServletSession are they serializable" New topic
Author

HttpServletRequest , HttpServletSession are they serializable

anagha patankar
Ranch Hand

Joined: Dec 26, 2005
Posts: 53
Hello ,
Wondering in a clusetered environment how the application servers share across the network the HttpServletRequest and HttpServletSession object ?

I tried checking the application server implementation classes and wastnt able to find implementation classes making use of the serializable interface .

Regards ,
-anagha
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

The individual objects that are stored into httpsession must be serializable so that they can replicated to a secondary server.


Groovy
ak pillai
author
Ranch Hand

Joined: Feb 11, 2006
Posts: 288
Care should be taken to minimize size of objects stored in a session and objects stored in a session should be serializable.


java j2ee job interview questions with answers | Learn the core concepts and the key areas
Jass Singh
Ranch Hand

Joined: Mar 30, 2006
Posts: 52
Originally posted by anagha patankar:
Hello ,
Wondering in a clusetered environment how the application servers share across the network the HttpServletRequest and HttpServletSession object ?

I tried checking the application server implementation classes and wastnt able to find implementation classes making use of the serializable interface .

Regards ,
-anagha


In WebLogic there is in memory replication of session. You need to provide settings for that in weblogic.xml.

Say you have server1 & server2 in cluster. Now a session is created on server1. So server1 becomes primary for that session and session is replicated on server2, which is called secondary. When server1 goes down session automatically failsover to server2 which now becomes primary. Later if server1 is up again it will become secondary for that session.

Since all session data has to travel over network from primary to secondary so it has to be serializable.


Jass
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HttpServletRequest , HttpServletSession are they serializable