#283 - SPI change: Rename BootupEbeanManager to SpiContainer ... with a view to future exposing cluster specific methods

This commit is contained in:
rbygrave committed 2015-05-01 22:06:55 +12:00
1 parent 819edb20e8
commit fc3e1083d7
5 files changed
+61 -64

No files matched your search

@@ -1,6 +1,6 @@
package com.avaje.ebeaninternal.server.lib;
import com.avaje.ebean.common.BootupEbeanManager;
import com.avaje.ebean.common.SpiContainer;
import com.avaje.ebeaninternal.api.ClassUtil;
import com.avaje.ebeaninternal.api.SpiEbeanServer;
import org.slf4j.Logger;
@@ -29,7 +29,7 @@ public final class ShutdownManager {
static boolean stopping;
static BootupEbeanManager serverFactory;
static SpiContainer container;
static {
// Register the Shutdown hook
@@ -42,8 +42,8 @@ public final class ShutdownManager {
private ShutdownManager() {
}
public static void registerServerFactory(BootupEbeanManager factory){
serverFactory = factory;
public static void registerContainer(SpiContainer ebeanContainer){
container = ebeanContainer;
}
/**
@@ -128,9 +128,9 @@ public final class ShutdownManager {
}
}
if (serverFactory != null) {
if (container != null) {
// shutdown cluster networking if active
serverFactory.shutdown();
container.shutdown();
}
// shutdown any registered servers that have not