Multi-tenant data source switching system based on method parameter aspect
A technology for switching systems and data sources, applied in the field of multi-tenant data source switching systems based on method parameter aspects, can solve the problems of low isolation level, increased security development volume, low security, etc. effect on stability
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment Construction
[0025] The present invention will be further described below in conjunction with the accompanying drawings.
[0026] see as figure 1 As shown, the specific implementation method includes the following steps:
[0027] 1. The user logs in, and the unified authentication returns which library the current user belongs to, and the identifier is cid, which is the sub-database key; each user carries the cid after logging in.
[0028] 2. Before intercepting the method, in the system execution context SysContext, bind ThreadLocal to each request, ThreadLocal saves the current cid, and releases it when it is used up.
[0029] 3. After intercepting the method, find the data source corresponding to the cid from the memory, and switch the current data source. The data source is also a bound thread, and the end of a thread request will also release the current data source.
[0030] 4. The connection pool cannot be shared between applications. Each application in the cluster maintains the...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 
