spring-projects / spring-projects/spring-session
Hazelcast session updates - Spring Boot
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.9k
- Forks
- 1.2k
- Avg merge
- 4h 27m
- Merged PRs (30d)
- 55
Description
Hi,
Could you please help me to clarify something:
I've noticed that all Sessions that are retrieved from HazelcastSessionRepository are the copies of basic sessions that stored in MapProxyImpl instance. So if I change a proxy session's attribute property:
(This example is not an actual usage, Its just for clarification)
List list = hazelcastRepository.getSession("1").getAttribute("List");
list.add(new Object()); //list.size = 1
List list1 = hazelcastRepository.getSession("1").getAttribute("List");
list1.size() // 0
The basic session's (in MapProxyImpl) attribute 'List' is not updated as well.
Is there a way to merge original session object inside MapProxyImpl and the proxy (copy) session attributes or enable direct session access, not via proxy?
I know, that I could use HazelcastSessionRepository.save() - but the HazelcastSessionRepository.Session has unreachable access.
Thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading HazelcastSessionRepository and the MapProxyImpl interaction described in the report, focusing on getSession(), getAttribute(), and save(). Verify whether retrieved sessions intentionally contain copied attributes and determine what access or persistence behavior is expected; completion requires a documented resolution or a clearly scoped change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100