JBoss7 web session persistence

I was struggling migrating *.ear from JBoss 5.1 to 7.1.1

Last bit which I couldn’t figured out — was storing sessions (client’s web sessions) between redeploy.

Well, solution is pretty easy — just add

-Dorg.apache.catalina.session.StandardManager.PATHNAME=sessions.ser

to JAVA_OPTS, and you got it! :)