I think you need to step back from the problem a bit.
Here is what I do with user data that represents the current state of taking a mock exam.
All data needed to recreate the user's state is stored in a serialized object that is persisted to disk with a unique name. That name is stored in the user's session while taking the
test and is also displayed to the user so they can copy it. The object is serialized to disk with every significant change and there is also a in memory collection that holds it.
During an active session, the in-memory collection provides the current state, grabbing the unique name from the session or from a hidden form variable.
When a user resumes a test, he enters the unique name at the start and the state is restored. Therefore I don't care what the server does with a session.
Bill