<servlet-container name="default"> <persistent-sessions path="session" relative-to="jboss.server.temp.dir"/> <jsp-config/> </servlet-container>By specifying the relative-to attribute, the session will only be persistent across redeploys and not across server restarts.
This feature works in WildFly 8.2.0.CR1 and greater.
You can also achieve session passivation, when you are using a non-ha profile, by adding <distributable/> to your web.xml (for those using WildFly 8.1.0 or less).