|Re: [jetty-dev] Session Management with Redis|
I’m not trying to build Mongo session management, I’m looking at the code to figure out how I should implement Redis session management. I’m using Dropwizard 1.0.0, which uses jetty 9.3 (https://github.com/dropwizard/dropwizard/blob/master/dropwizard-bom/pom.xml). Once I’ve got my working solution I’m happy to donate it and port it to 9.4, but I need 9.3 for now. http://www.eclipse.org/jetty/about.html also seems to think that this is the production version.
Van: jetty-dev-bounces@xxxxxxxxxxx [mailto:jetty-dev-bounces@xxxxxxxxxxx]
Namens Jan Bartel
Any chance you could build your own mongo session management for jetty-9.4? We have totally re-architected sessions and made it much, much cleaner, clearer and easier to implement for different technologies? I really really recommend you go that way if you possibly can.
I'd be interested to know your motivation for rolling-your-own mongo session management? Always keen to know if there is some functionality that we should be providing in the standard jetty release that would be helpful to the greatest number of users ....
Looks to me like you've found some funnies in the mongo code around line 420: seems weird that we remove the attribute, and then call the http session value unbinding listener with a null value. Also undesirable that there is the side-effect of saving the session in doPutOrRemove: if more than 1 attribute had been removed from the session, the first iteration around would promptly write back in the other attributes! I would remove all of the attributes from the session, remembering their values and then call the http session unbinding listeners but forego calling sesion.save() at all.
For these kind of reasons, I strongly recommend basing your impl of jetty-9.4 instead.
On 20 September 2016 at 22:33, Friso Vrolijken <friso.vrolijken@xxxxxxxxxxxxx> wrote:
Back to the top