spring - Change data source dynamically on user login -


i have project has following requeriments:

  1. allow users login in same web application using different schemas following criteria;
  2. dynamically route datasource against rule - example, users in company should access schema a, users in company b should access schema b;
  3. the business logic authenticates user`s should in business component - ejb, because new applications can added , logic must outside web application.

i read using dynamic data source routing. customercontextholder has field threadlocal. threadlocal guarantee user access schema following criteria? code thread safe?

the way understand need multi tenency spring along datasource.

probably have have spring extension might

https://github.com/mariofts/spring-multitenancy


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -