mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-10-23 10:03:59 +00:00
#493 - ENH: Multi-tenant support - update bootup DataSource check
This commit is contained in:
@@ -100,10 +100,13 @@ public class DefaultContainer implements SpiContainer {
|
||||
if (serverConfig.isDocStoreOnly()) {
|
||||
serverConfig.setDatabasePlatform(new H2Platform());
|
||||
} else {
|
||||
if (!serverConfig.getTenantMode().isDynamicDataSource()) {
|
||||
TenantMode tenantMode = serverConfig.getTenantMode();
|
||||
if (!TenantMode.DB.equals(tenantMode)) {
|
||||
setDataSource(serverConfig);
|
||||
// check the autoCommit and Transaction Isolation
|
||||
online = checkDataSource(serverConfig);
|
||||
if (!tenantMode.isDynamicDataSource()) {
|
||||
// check the autoCommit and Transaction Isolation
|
||||
online = checkDataSource(serverConfig);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2506,7 +2506,7 @@ public class BeanDescriptor<T> implements MetaBeanInfo, BeanType<T> {
|
||||
* Set the Tenant Id value to the bean.
|
||||
*/
|
||||
public void setTenantId(EntityBean entityBean, Object tenantId) {
|
||||
if (tenantId != null) {
|
||||
if (tenant != null) {
|
||||
tenant.setValue(entityBean, tenantId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user