|
|
@ -9,6 +9,7 @@ import com.fr.event.Null; |
|
|
|
import com.fr.exit.ConfigToPropMigrator; |
|
|
|
import com.fr.exit.ConfigToPropMigrator; |
|
|
|
import com.fr.stable.db.tenant.TenantDBAdapter; |
|
|
|
import com.fr.stable.db.tenant.TenantDBAdapter; |
|
|
|
import com.fr.start.event.LazyStartupEvent; |
|
|
|
import com.fr.start.event.LazyStartupEvent; |
|
|
|
|
|
|
|
import com.fr.start.server.EmbedServerEvent; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @author hades |
|
|
|
* @author hades |
|
|
@ -24,7 +25,15 @@ public class TenantDBAdapter4Designer extends TenantDBAdapter { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void on(Event event, Null param) { |
|
|
|
public void on(Event event, Null param) { |
|
|
|
TenantDBAdapter4Designer.super.start(); |
|
|
|
TenantDBAdapter4Designer.super.start(); |
|
|
|
afterStart(); |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
listenEvent(EmbedServerEvent.BeforeStart, new Listener<Null>() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void on(Event event, Null param) { |
|
|
|
|
|
|
|
if (DaoSelectorFactory.getDaoSelector().useCacheDao()) { |
|
|
|
|
|
|
|
beforeEmbedServerStart(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
@ -33,7 +42,7 @@ public class TenantDBAdapter4Designer extends TenantDBAdapter { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void afterStart() { |
|
|
|
private void beforeEmbedServerStart() { |
|
|
|
DesignerEnvManager.getEnvManager().setPropertiesUsable(false); |
|
|
|
DesignerEnvManager.getEnvManager().setPropertiesUsable(false); |
|
|
|
DaoSwitcher.executeSwitch(); |
|
|
|
DaoSwitcher.executeSwitch(); |
|
|
|
ConfigToPropMigrator.getInstance().deletePropertiesCache(); |
|
|
|
ConfigToPropMigrator.getInstance().deletePropertiesCache(); |
|
|
|