FINERACT-2081: Consider read-only all the transactions when the connection is read-only
This commit is contained in:
+2
-4
@@ -70,10 +70,8 @@ public class TomcatJdbcDataSourcePerTenantService implements RoutingDataSourceSe
|
||||
Long tenantConnectionKey = tenantConnection.getConnectionId();
|
||||
// if tenantConnection information available switch to the
|
||||
// appropriate datasource for that tenant.
|
||||
actualDataSource = TENANT_TO_DATA_SOURCE_MAP.computeIfAbsent(tenantConnectionKey, (key) -> {
|
||||
DataSource tenantSpecificDataSource = dataSourcePerTenantServiceFactory.createNewDataSourceFor(tenantConnection);
|
||||
return tenantSpecificDataSource;
|
||||
});
|
||||
actualDataSource = TENANT_TO_DATA_SOURCE_MAP.computeIfAbsent(tenantConnectionKey,
|
||||
(key) -> dataSourcePerTenantServiceFactory.createNewDataSourceFor(tenantConnection));
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user