Question

I'm working with an application in jsf and continuously Delivery to Heroku. I'm new to both JSF and Heroku. I don't know if it's possible but my wish is to be able to do minor updates on the application, deploy to Heroku but still let the sessions survive for the session scoped manage beans. I have set the State saving to be client in my web.xml but when I deploy the application to Heroku all the values in the manage beans are reset to their init values. Does anyone know how to fix this? Thank you

Was it helpful?

Solution

On Heroku you need to externalize your session state (or preferably don't use session state, which unfortunately isn't an option with JSF). Configuring your app server to do this is usually pretty easy but it depends on which app server you are using. Here is how to do it with Jetty and MongoDB as the session store:
http://www.jamesward.com/2011/11/30/using-mongodb-for-a-java-web-apps-httpsession

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top