I ended up solving my problem with a AtmosphereResourceEventListener
which creates and destroys a session per AtmosphereResource
.
I'm surprised that other people haven't had this problem, it seems like a pretty normal requirement to want a session per client connection.
If anyone is interested in my solution, some interesting classes are: