Thursday, December 12, 2013

Previously we have implemented sticky session.
Here's the link on our environment: Sticky Session in apache doesn't work
Our next task is to implement session replication.
We are current using tomcat example, cart.jsp to demonstrate this behavior.
It is said that all session attribute must implement java.io.serializable.
Do you have any tips on where to implement it? We are following this tutorial closely.
tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html
share|improve this question
 
I think we have implemented serializable correctly. The problem might be other things. Is there other tutorial we can follow to implement session replication? –  Wen Jun Sep 16 '11 at 13:10
 
What is the error eaxctly? Are you losing session data? How are you testing this? If session stickiness is working, then do you need session replication? –  JoseK Sep 19 '11 at 6:47 
 
We are suppose to demonstrate sticky session and session replication to the class. Here is the test like: We are using tomcat example, date.jsp to demonstrate this. We set session.setAttribute("abc","123") in one machine and the other machine session.getAttribute. We will take down the first machine and the browser will still show 123 due to session replication –  Wen Jun Sep 20 '11 at 9:20 
 
or rather, how should i test if my session replication implementation is working? –  Wen Jun Sep 20 '11 at 10:06
 
Your test case should be : Use only one browser and one machine. No need for 2nd machine. Set some attribute into the session, and on another JSP get it back from session. AFTER THAT, bring down one server. Then again hit your 2nd JSP. If replication is working, you will still see your session attribute. If you get null, it means replication is not working. Further do out.print JSESSIONID as well. you should see a new JSESSIONID but still get the correct value from session. –  JoseK Sep 20 '11 at 10:31 
add comment

No comments: