-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Make JdbcOperationsSessionRepository.JdbcSession visible #1274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
As noted in the related issues we consider Also could you clarify how this would help you implement |
Closing due to lack of feedback. Please comment back if you can provide more details and we can re-open the issue. |
@vpavic Apologies for the delay, I hadn't noticed the earlier comment.
It is indeed an implementation detail, but it's also effectively exposed as part of the generic signature of Even if the registry is parametrized, it won't be able to take Even with some parametrisation to the custom registry, this wouldn't work:
I can write the SQL queries directly in |
Sorry about late response to this @harbulot. If I understand correctly what you were trying to achieve, I'm not sure why simply something like this wouldn't work: public class JdbcSpringSessionBackedSessionRegistry<S extends Session>
extends SpringSessionBackedSessionRegistry<S> {
private final JdbcOperations jdbcOperations;
public JdbcSpringSessionBackedSessionRegistry(
FindByIndexNameSessionRepository<S> sessionRepository,
JdbcOperations jdbcOperations) {
super(sessionRepository);
this.jdbcOperations = jdbcOperations;
}
@Override
public List<Object> getAllPrincipals() {
// ...
}
} If you're deeper into customization, providing a custom |
(This is using Spring Session 2.1.1.)
Please consider making
JdbcOperationsSessionRepository.JdbcSession
visible. Some use cases have already been suggested in #943 and #1217, here is another one.I'm trying to implement a
SpringSessionBackedSessionRegistry
(mainly to implementgetAllPrincipals()
) backed by aJdbcOperationsSessionRepository
, which itself implementsFindByIndexNameSessionRepository<JdbcOperationsSessionRepository.JdbcSession>
.It would be good to be able to use the generic types:
However,
JdbcSession
is not visible, so this can't be used in a different package.Here is a workaround, but we lose the generics checks:
The text was updated successfully, but these errors were encountered: