Class PubServerLifeCycleModule
Tracks the PubServer life-cycle phase.
Historically this was implemented as a GlassFish life-cycle module
(com.sun.appserv.server.LifecycleListener). Payara Community 7.2026.2
removed the Lifecycle Modules feature (both the create-lifecycle-module
admin command and the com.sun.appserv.server.* SPI), so the server
READY event is no longer delivered through that channel.
The phase is now derived purely from the portable plugin-readiness map
(CheckPlugins / PluginLibraryControl), which uses no Payara API.
"Required plugins are up" is itself evidence that the server is ready:
a plugin cannot finish its @Startup startup() before the server
is running applications. See ADR 0006 (PRIINT-12809).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumPubServer life-cycle phases -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddStatusObserver(StatusObserver observer) Add a static observer to the life-cycle state.Returns the current PubServer life-cycle phase.
-
Method Details
-
addStatusObserver
Add a static observer to the life-cycle state. The observer is called when the server transitions intoPubServerLifeCycleModule.PubServerLifeCyclePhase.READY; if the server is already READY at registration time, the observer is notified immediately, so no transition can be missed regardless of registration order.Contract: observers are invoked asynchronously on a dedicated notification thread (never on the registering or phase-querying thread) and MUST be idempotent — a duplicate
statusChanged()call must be a no-op.- Parameters:
observer- observer to register
-
getPubServerPhase
Returns the current PubServer life-cycle phase.The phase is computed live from the plugin-readiness map:
- PlannerEngine not started yet →
PubServerLifeCycleModule.PubServerLifeCyclePhase.INIT - PlannerEngine up but a mandatory plugin missing →
PubServerLifeCycleModule.PubServerLifeCyclePhase.MANDATORY_PLUGIN_MISSING - PlannerEngine up and all mandatory plugins up →
PubServerLifeCycleModule.PubServerLifeCyclePhase.READY
StatusObservers are notified exactly once, asynchronously (seeaddStatusObserver(com.priint.pubserver.interfaces.StatusObserver)). - PlannerEngine not started yet →
-