JdbcOperationsSessionRepository
See original GitHub issueHello,
we are using spring-session-1.3.1.RELEASE
and have multiple issues/recommendations:
-
Modify the visibility for some classes to make them easier extendable. Composition doesn’t work all the time (I’m speaking about those
private static
parameters andprivate final
inner classes). -
Fire events whenever a session gets created/deleted, or just provide the possibility for adding listeners.
-
It would be nice to have a strategy for setting the Spring SESSION_ID (e.g., for org.springframework.session.jdbc.JdbcOperationsSessionRepository). Right now you have to derive from
JdbcOperationsSessionRepository
and overridecreateSession()
. This way you can access your resources for determining the SESSION_ID, but:
To create a new org.springframework.session.jdbc.JdbcOperationsSessionRepository.JdbcSession
, you have to provide an e.g., org.springframework.session.MapSession.MapSession(String)
. Unfortunately the isNew
flag will be set to false
, hence the newly generated session will not be persisted within the repository.
Regards, Manuel
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (5 by maintainers)
@wjun20314 You might find this comment useful.
Also note that since your question is unrelated to this ticket it’s preferable to open a new one or ask on our Gitter channel or Stack Overflow using
spring-session
tag.Update: Now I see you’ve posted on SO (if this is you), I’ve provided an answer.
I using
spring-session-2.0.1.RELEASE
but I have errorthe type org.springframework.session.jdbc.JdbcOperationsSessionRepository.JdbcSession is not visible
, may I know how can I create session by using JdbcOperationsSessionRepository and assign to JdbcSession?Then I will use JdbcOperationsSessionRepository will save the JdbcSession to database.