A question about TransactionManager, spring-session-jdbc and seperate datasource

173 Views Asked by At

I'm using spring-session-jdbc to store HTTP sessions in a PostgreSQL database. I have another primary DataSource for my application.

When using @SpringSessionDataSource, you can define a different DataSource for Spring Session. However, by default, the TransactionManager in JdbcIndexedSessionRepository is created with the primary DataSource.

For now, I am using a bean TransactionOperations.withoutTransaction() to avoid the transaction in Spring Session. However, I think it could be a problem, or I might be missing something.

0

There are 0 best solutions below