spring - Change data source dynamically on user login -
i have project has following requeriments:
- allow users login in same web application using different schemas following criteria;
- dynamically route datasource against rule - example, users in company should access schema a, users in company b should access schema b;
- 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
Comments
Post a Comment