Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Align WebSession#save implementations with API clarifications #47

Open
vpavic opened this issue Oct 17, 2018 · 1 comment
Open

Align WebSession#save implementations with API clarifications #47

vpavic opened this issue Oct 17, 2018 · 1 comment

Comments

@vpavic
Copy link
Contributor

vpavic commented Oct 17, 2018

See spring-projects/spring-session#1135 - looking at the implementation of ReactiveMongoOperationsSessionRepository it doesn't appear to comply with the WebSession#save API.

gregturn added a commit that referenced this issue Jan 16, 2019
Only perform a save after verifying the MongoSession already exists in MongoDB. Otherwise, throw an IllegalStateException.

Resolved #47.
gregturn added a commit that referenced this issue Jan 16, 2019
Only perform a save after verifying the MongoSession already exists in MongoDB. Otherwise, throw an IllegalStateException.

Resolved #47.
@gregturn
Copy link
Contributor

Digging deeper, it appears that MongoSession needs some concept of isNew. If a session is new, save it to the store. If a session is NOT new, then verify the id is in the data store before doing another save.

gregturn added a commit that referenced this issue Jan 16, 2019
Only perform a save after verifying the MongoSession already exists in MongoDB. Otherwise, throw an IllegalStateException.

Resolved #47.
gregturn added a commit that referenced this issue Jan 16, 2019
Introduce new state to MongoSession denoting if a session is new or not. Only perform a save on a non-new MongoSession if it already exists in the MongoDB. Otherwise, throw an IllegalStateException.

Resolved #47.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants