I am working in a project using Spring, Spring Data JPA, Spring Security, Primefaces...
I was following this tutorial about dynamic datasource routing with spring.>
The datasource used by a thread might change from time to time. Should pay attention to concurrency, applications might get concurrency issues in concurrent environment. thread-bound AbstractRoutingDataSource sample