-1

connection(id :358250360) was acquired 14:11:55,420 and released at 14:11:55,471 which covered 51 ms and during this 51 ms spring session did 7 update operations. This is caused only by accessing a URL. if lots of users are online at the same time, the connections in the pool could be in short supply. I wonder if it is the fact of spring session with jdbc or I missed some configurations.

14:11:55,420 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Creating new transaction with name [null]: PROPAGATION_REQUIRES_NEW,ISOLATION_DEFAULT
14:11:55,420 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Acquired Connection [358250360, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] for JDBC transaction
14:11:55,420 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Switching JDBC Connection [358250360, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] to manual commit
14:11:55,420 DEBUG: org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL update
14:11:55,420 DEBUG: org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL statement [UPDATE SPRING_SESSION SET LAST_ACCESS_TIME = ?, MAX_INACTIVE_INTERVAL = ?, PRINCIPAL_NAME = ? WHERE SESSION_ID = ?]
14:11:55,417 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Releasing JDBC Connection [592735956, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] after transaction
14:11:55,421 DEBUG: org.springframework.jdbc.datasource.DataSourceUtils - Returning JDBC Connection to DataSource
14:11:55,417 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Creating new transaction with name [null]: PROPAGATION_REQUIRES_NEW,ISOLATION_DEFAULT
14:11:55,422 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Creating new transaction with name [null]: PROPAGATION_REQUIRES_NEW,ISOLATION_DEFAULT
14:11:55,422 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Acquired Connection [384136626, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] for JDBC transaction
14:11:55,422 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Switching JDBC Connection [384136626, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] to manual commit
14:11:55,422 DEBUG: org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL query
14:11:55,422 DEBUG: org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL statement
14:11:55,423 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Acquired Connection [744825705, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] for JDBC transaction
14:11:55,425 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Switching JDBC Connection [744825705, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] to manual commit
14:11:55,425 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Initiating transaction commit
14:11:55,425 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Committing JDBC transaction on Connection [744825705, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver]
14:11:55,425 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Releasing JDBC Connection [744825705, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] after transaction
14:11:55,425 DEBUG: org.springframework.jdbc.datasource.DataSourceUtils - Returning JDBC Connection to DataSource
14:11:55,427 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Creating new transaction with name [null]: PROPAGATION_REQUIRES_NEW,ISOLATION_DEFAULT
14:11:55,428 DEBUG: org.springframework.jdbc.core.JdbcTemplate - SQL update affected 1 rows
14:11:55,428 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Acquired Connection [832455532, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] for JDBC transaction
14:11:55,428 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Initiating transaction commit
14:11:55,428 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Switching JDBC Connection [832455532, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] to manual commit
14:11:55,428 DEBUG: org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL query
14:11:55,428 DEBUG: org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL statement
14:11:55,428 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Committing JDBC transaction on Connection [1153338657, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver]
14:11:55,431 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Releasing JDBC Connection [1153338657, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] after transaction
14:11:55,431 DEBUG: org.springframework.jdbc.support.lob.DefaultLobHandler - Returning BLOB as bytes
14:11:55,431 DEBUG: org.springframework.jdbc.support.lob.DefaultLobHandler - Returning BLOB as bytes
14:11:55,431 DEBUG: org.springframework.jdbc.core.JdbcTemplate - SQL update affected 1 rows
14:11:55,431 DEBUG: org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL update
14:11:55,431 DEBUG: org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL statement [UPDATE SPRING_SESSION_ATTRIBUTES SET ATTRIBUTE_BYTES = ? WHERE SESSION_ID = ? AND ATTRIBUTE_NAME = ?]
14:11:55,431 DEBUG: org.springframework.jdbc.datasource.DataSourceUtils - Returning JDBC Connection to DataSource
14:11:55,433 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Initiating transaction commit
14:11:55,433 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Committing JDBC transaction on Connection [832455532, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver]
14:11:55,433 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Initiating transaction commit
14:11:55,433 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Committing JDBC transaction on Connection [384136626, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver]
14:11:55,433 DEBUG: org.springframework.jdbc.support.lob.DefaultLobHandler - Set bytes for BLOB with length 979
14:11:55,434 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Creating new transaction with name [null]: PROPAGATION_REQUIRES_NEW,ISOLATION_DEFAULT
14:11:55,434 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Acquired Connection [1724464517, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] for JDBC transaction
14:11:55,434 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Switching JDBC Connection [1724464517, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] to manual commit
14:11:55,434 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Initiating transaction commit
14:11:55,434 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Committing JDBC transaction on Connection [1724464517, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver]
14:11:55,434 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Releasing JDBC Connection [1724464517, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] after transaction
14:11:55,434 DEBUG: org.springframework.jdbc.datasource.DataSourceUtils - Returning JDBC Connection to DataSource
14:11:55,435 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Releasing JDBC Connection [832455532, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] after transaction
14:11:55,435 DEBUG: org.springframework.jdbc.datasource.DataSourceUtils - Returning JDBC Connection to DataSource
14:11:55,437 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Creating new transaction with name [null]: PROPAGATION_REQUIRES_NEW,ISOLATION_DEFAULT
14:11:55,437 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Acquired Connection [1825775842, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] for JDBC transaction
14:11:55,437 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Switching JDBC Connection [1825775842, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] to manual commit
14:11:55,437 DEBUG: org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL query
14:11:55,437 DEBUG: org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL statement
14:11:55,437 DEBUG: org.springframework.jdbc.core.JdbcTemplate - SQL update affected 1 rows
14:11:55,437 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Releasing JDBC Connection [384136626, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] after transaction
14:11:55,437 DEBUG: org.springframework.jdbc.datasource.DataSourceUtils - Returning JDBC Connection to DataSource
14:11:55,437 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Initiating transaction commit
14:11:55,437 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Committing JDBC transaction on Connection [1843345656, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver]
14:11:55,438 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Creating new transaction with name [null]: PROPAGATION_REQUIRES_NEW,ISOLATION_DEFAULT
14:11:55,438 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Acquired Connection [970762077, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] for JDBC transaction
14:11:55,438 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Switching JDBC Connection [970762077, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] to manual commit
14:11:55,441 DEBUG: org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL update
14:11:55,441 DEBUG: org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL statement [UPDATE SPRING_SESSION SET LAST_ACCESS_TIME = ?, MAX_INACTIVE_INTERVAL = ?, PRINCIPAL_NAME = ? WHERE SESSION_ID = ?]
14:11:55,441 DEBUG: org.springframework.jdbc.support.lob.DefaultLobHandler - Returning BLOB as bytes
14:11:55,442 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Releasing JDBC Connection [1843345656, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] after transaction
14:11:55,442 DEBUG: org.springframework.jdbc.datasource.DataSourceUtils - Returning JDBC Connection to DataSource
14:11:55,443 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Initiating transaction commit
14:11:55,443 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Committing JDBC transaction on Connection [1825775842, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver]
14:11:55,443 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Creating new transaction with name [null]: PROPAGATION_REQUIRES_NEW,ISOLATION_DEFAULT
14:11:55,443 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Acquired Connection [933084215, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] for JDBC transaction
14:11:55,444 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Switching JDBC Connection [933084215, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] to manual commit
14:11:55,444 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Initiating transaction commit
14:11:55,444 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Committing JDBC transaction on Connection [933084215, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver]
14:11:55,444 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Releasing JDBC Connection [933084215, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] after transaction
14:11:55,444 DEBUG: org.springframework.jdbc.datasource.DataSourceUtils - Returning JDBC Connection to DataSource
14:11:55,442 DEBUG: org.springframework.jdbc.core.JdbcTemplate - SQL update affected 1 rows
14:11:55,445 DEBUG: org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL update
14:11:55,445 DEBUG: org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL statement [UPDATE SPRING_SESSION_ATTRIBUTES SET ATTRIBUTE_BYTES = ? WHERE SESSION_ID = ? AND ATTRIBUTE_NAME = ?]
14:11:55,446 DEBUG: org.springframework.jdbc.support.lob.DefaultLobHandler - Set bytes for BLOB with length 979
14:11:55,447 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Releasing JDBC Connection [1825775842, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] after transaction
14:11:55,447 DEBUG: org.springframework.jdbc.datasource.DataSourceUtils - Returning JDBC Connection to DataSource
14:11:55,448 DEBUG: org.springframework.jdbc.core.JdbcTemplate - SQL update affected 1 rows
14:11:55,448 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Initiating transaction commit
14:11:55,448 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Committing JDBC transaction on Connection [1674506398, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver]
14:11:55,449 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Creating new transaction with name [null]: PROPAGATION_REQUIRES_NEW,ISOLATION_DEFAULT
14:11:55,449 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Acquired Connection [1283280084, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] for JDBC transaction
14:11:55,450 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Creating new transaction with name [null]: PROPAGATION_REQUIRES_NEW,ISOLATION_DEFAULT
14:11:55,449 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Creating new transaction with name [null]: PROPAGATION_REQUIRES_NEW,ISOLATION_DEFAULT
14:11:55,450 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Acquired Connection [194367212, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] for JDBC transaction
14:11:55,450 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Switching JDBC Connection [1283280084, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] to manual commit
14:11:55,450 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Switching JDBC Connection [194367212, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] to manual commit
14:11:55,450 DEBUG: org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL update
14:11:55,450 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Acquired Connection [1367061108, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] for JDBC transaction
14:11:55,450 DEBUG: org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL statement [UPDATE SPRING_SESSION SET LAST_ACCESS_TIME = ?, MAX_INACTIVE_INTERVAL = ?, PRINCIPAL_NAME = ? WHERE SESSION_ID = ?]
14:11:55,450 DEBUG: org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL query
14:11:55,450 DEBUG: org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL statement
14:11:55,450 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Switching JDBC Connection [1367061108, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] to manual commit
14:11:55,451 DEBUG: org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL update
14:11:55,451 DEBUG: org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL statement [UPDATE SPRING_SESSION SET LAST_ACCESS_TIME = ?, MAX_INACTIVE_INTERVAL = ?, PRINCIPAL_NAME = ? WHERE SESSION_ID = ?]
14:11:55,453 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Releasing JDBC Connection [1674506398, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] after transaction
14:11:55,453 DEBUG: org.springframework.jdbc.datasource.DataSourceUtils - Returning JDBC Connection to DataSource
14:11:55,454 DEBUG: org.springframework.jdbc.core.JdbcTemplate - SQL update affected 1 rows
14:11:55,454 DEBUG: org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL update
14:11:55,454 DEBUG: org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL statement [UPDATE SPRING_SESSION_ATTRIBUTES SET ATTRIBUTE_BYTES = ? WHERE SESSION_ID = ? AND ATTRIBUTE_NAME = ?]
14:11:55,454 DEBUG: org.springframework.jdbc.support.lob.DefaultLobHandler - Returning BLOB as bytes
14:11:55,455 DEBUG: org.springframework.jdbc.support.lob.DefaultLobHandler - Set bytes for BLOB with length 979
14:11:55,455 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Creating new transaction with name [null]: PROPAGATION_REQUIRES_NEW,ISOLATION_DEFAULT
14:11:55,456 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Acquired Connection [1356824368, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] for JDBC transaction
14:11:55,456 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Switching JDBC Connection [1356824368, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] to manual commit
14:11:55,456 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Initiating transaction commit
14:11:55,460 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Committing JDBC transaction on Connection [1356824368, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver]
14:11:55,461 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Releasing JDBC Connection [1356824368, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] after transaction
14:11:55,461 DEBUG: org.springframework.jdbc.datasource.DataSourceUtils - Returning JDBC Connection to DataSource
14:11:55,455 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Initiating transaction commit
14:11:55,465 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Committing JDBC transaction on Connection [194367212, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver]
14:11:55,465 DEBUG: org.springframework.jdbc.core.JdbcTemplate - SQL update affected 1 rows
14:11:55,465 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Initiating transaction commit
14:11:55,465 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Committing JDBC transaction on Connection [358250360, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver]
14:11:55,468 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Creating new transaction with name [null]: PROPAGATION_REQUIRES_NEW,ISOLATION_DEFAULT
14:11:55,468 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Acquired Connection [738764354, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] for JDBC transaction
14:11:55,468 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Switching JDBC Connection [738764354, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] to manual commit
14:11:55,468 DEBUG: org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL query
14:11:55,468 DEBUG: org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL statement
14:11:55,471 DEBUG: org.springframework.jdbc.datasource.DataSourceTransactionManager - Releasing JDBC Connection [358250360, URL=jdbc:postgresql://10.24.11.231:5432/a, UserName=postgres, PostgreSQL Native Driver] after transaction
14:11:55,471 DEBUG: org.springframework.jdbc.datasource.DataSourceUtils - Returning JDBC Connection to DataSource
Vedran Pavic
  • 2,339
  • 2
  • 27
  • 31
Alvin
  • 12
  • 1

1 Answers1

1

This is a perfectly normal scenario.

During the implementation of Spring Session JDBC support a lot of effort has been made to make the interaction with underlying database as efficient as possible, however if your app will be used in highly concurrent manner with many users I'd advise you to consider using a more performant technology, such as Redis or Hazelcast, to back your SessionRepository.

Vedran Pavic
  • 2,339
  • 2
  • 27
  • 31
  • `JdbcOperationsSessionRepository` seems to only recognize an explicitly `setAttribute(K, V)`, so to `save` `updatedCount` would be valid. I used a map as V return from `getAttribute(K)`, and changed it without `setAttribute`. However, that repository class does not persist it. This conflicts the behavior of a normal `HttpSession` (where I can have it updated next time when taking session out). – Tiina Dec 15 '17 at 03:27
  • Spring Session `SessionRepository` implementations save session to external data store, so naturally the session instances returned from the repo are actually a copies that have to be saved when modified. Servlet container's default session manager is typically in-memory, like Tomcat, which means you're dealing with the same session object all the time so you can get away with the approach you described. This is not in conflict with `HttpSession` as such behavior, AFAIK, isn't documented anywhere in the API. You'd run into the same situation using Tomcat's persistent session manager. – Vedran Pavic Dec 15 '17 at 09:31
  • `updatedCount` in `JdbcOperationSessionRepository` should actually treat an "updated" value as an updated one, now it obviously executes this with an prerequisite. – Tiina Dec 18 '17 at 01:30