Out with ShutdownManager, in with LifecycleManager which handles both
initialization and shutdown. This will obviate the need for a lot of manual wiring up. ShutdownManager still works and passes through to LifecycleManager, but switching to the new deal is encouraged. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5802 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -159,10 +159,13 @@ public class PresentsServer
|
||||
// initialize the time base services
|
||||
TimeBaseProvider.init(_invmgr, _omgr);
|
||||
|
||||
// Make the client manager shut down before the invoker and dobj threads. This will help
|
||||
// application code to avoid long chains of shutdown constraints (e.g. msoy bureau manager).
|
||||
_shutmgr.addConstraint(
|
||||
_clmgr, ShutdownManager.Constraint.RUNS_BEFORE, (PresentsInvoker)_invoker);
|
||||
// make the client manager shut down before the invoker and dobj threads; this helps
|
||||
// application code to avoid long chains of shutdown constraints
|
||||
_lifemgr.addShutdownConstraint(
|
||||
_clmgr, LifecycleManager.Constraint.RUNS_BEFORE, (PresentsInvoker)_invoker);
|
||||
|
||||
// initialize all of our registered components
|
||||
_lifemgr.init();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -238,8 +241,8 @@ public class PresentsServer
|
||||
/** The manager of invocation services. */
|
||||
@Inject protected InvocationManager _invmgr;
|
||||
|
||||
/** Handles orderly shutdown of our managers, etc. */
|
||||
@Inject protected ShutdownManager _shutmgr;
|
||||
/** Handles orderly initialization and shutdown of our managers, etc. */
|
||||
@Inject protected LifecycleManager _lifemgr;
|
||||
|
||||
/** Handles generation of state of the server reports. */
|
||||
@Inject protected ReportManager _repmgr;
|
||||
|
||||
Reference in New Issue
Block a user