-
Notifications
You must be signed in to change notification settings - Fork 531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SessionImpl class is not serializable so fails in clustered session store. #89
Conversation
…rk with ClusteredSessionStore.
Hi Mark - is this still an issue? I will close this for now, if it is, please re-open :) |
Yes, it is still an issue. Apr 15, 2015 8:28:15 AM io.vertx.ext.apex.impl.RoutingContextImplBase |
Do you have a reproducer for this? |
package com.viewds.test.vertx.cluster; import io.vertx.core.AsyncResult; public class Example
} |
I have put the above code in GitHub. See https://github.com/mark-ennis/vertx-example/tree/master/cluster. |
Thanks Mark, this should be fixed now (PR waiting for review). The problem here was, although we have clustered session tests, they were all using the fake cluster manager which doesn't actually serialize the sessions. |
Great, thanks. |
The SessionImpl class is not serializable because is lacks a zero argument constructor. This means that it causes an exception when using sessions with a ClusteredSessionStore. The serialised form created by the writeToBuffer() method does not include the "timeout" field (which results in sessions being discarded as soon as they are referenced from the store) or the "id" field which appears to be needed, although, I did not identify exactly where. I have updated the SessionImpl class to overcome these problems.