JRuby – Rails – Cookie Session Stores
Tuesday, February 17th, 2009We are transitioning from Mongrels & Apache to JRuby & Glassfish v3. We use Cookie Session Stores in our RoR app Knetwit, they’re the default session store and work well for our load-balancing requirements. When we switched to Jruby/Glassfish, instead of our RoR cookies clients were recieving JSESSIONID cookies. Since the RoR session cookies actually store the session data and JSESSIONIDs do not our session load-balancing failed.
There are numerous solutions to load-balancing with Glassfish clusters and special Sticky Glassfish Clusters. This seems to be the most common answer to our trouble, but it introduces more variables into the transition.
In the end we set our
config.action_controller.session_store = cookie_store
and we were back in business.
Hopefully this helps someone else transitioning to JRuby/Glassfish.













