spring-projects / spring-projects/spring-session

Hazelcast session updates - Spring Boot

Open
#1,573 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.