• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HttpServletRequest , HttpServletSession are they serializable

 
anagha patankar
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The individual objects that are stored into httpsession must be serializable so that they can replicated to a secondary server.
 
ak pillai
author
Ranch Hand
Posts: 288
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Care should be taken to minimize size of objects stored in a session and objects stored in a session should be serializable.
 
Jass Singh
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic