#655 - DB Migration should not require running L2 cache (ie. Hazel cast server etc)

This commit is contained in:
Robin Bygrave
2016-04-21 10:33:09 +12:00
parent 8c535ba837
commit 29c51ecb95
@@ -108,7 +108,7 @@ public class DefaultContainer implements SpiContainer {
// inform the NamingConvention of the associated DatabasePlatform
serverConfig.getNamingConvention().setDatabasePlatform(serverConfig.getDatabasePlatform());
ServerCacheManager cacheManager = getCacheManager(serverConfig);
ServerCacheManager cacheManager = getCacheManager(online, serverConfig);
SpiBackgroundExecutor bgExecutor = createBackgroundExecutor(serverConfig);
@@ -147,9 +147,10 @@ public class DefaultContainer implements SpiContainer {
/**
* Create and return the CacheManager.
*/
private ServerCacheManager getCacheManager(ServerConfig serverConfig) {
private ServerCacheManager getCacheManager(boolean online, ServerConfig serverConfig) {
if (serverConfig.isDisableL2Cache()) {
if (!online || serverConfig.isDisableL2Cache()) {
// use local only L2 cache implementation as placeholder
return new DefaultServerCacheManager();
}