Glassfish Cluster 2.1.1, HttpSessions replication and multi-thread concurrent access
I have several clusters with Glassfish 2.1.1 in a BIG virtual environment and all worked fine … until I add new processors to this clusters. After upgrade, I started to have problems with HttpSession replication. Starting debugging JXTA, Shoal and the Web Container didn’t help at all. Until I found this page Memory Replication & Multi-threaded Concurrent Access to HttpSessions. My applications was doing multi-thread concurrent access some times (Ajax) and this was the root cause of all lost sessions. I modified sun-web.xml from my application, accordingly with the above blog post, and after that httpsession started to work as expected. All what you should do is to add relaxCacheVersionSemantics with true as value.
1 2 3 4 5 6 7 8 9 10 11 12 13 | <session-config> <session-manager persistence-type="replicated"> <manager-properties> <property name="persistenceFrequency" value="web-method"/> <property name="relaxCacheVersionSemantics" value="true"/> </manager-properties> <store-properties> <property name="persistenceScope" value="session"/> </store-properties> </session-manager> <session-properties/> <cookie-properties/> </session-config> |
Probably in a single processor environment httpsession working very well but on multicore/multiprocessor system you can have problem if you don’t specify relaxCacheVersionSemantics. Read Memory Replication & Multi-threaded Concurrent Access to HttpSessions for more informations.
Good Luck!















hell yea.thanx for sharing this post with me.i just found it buy google couse i was searching for
more info about this.Ang WOOHOO! i found your post that was so usefull for me
feel free to drop me email i will send small donation! love for all you here.
I found this site using google.com. And i want to thank you for your work. You have done really excellent site. Great work, great site! Cheers!
Sorry for offtopic
I sort of found your website by accident, but your web site caught attention and that i thought that I would post to tell you that I like it.
Leave your response!
Find us on Facebook
Donate me a Beer!
Recognition Wall
Syndicate
Blogroll
Tags
Promote
Categories
Recent Posts
Most Commented
Recent Comments