Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The DaemonApplication interface declares life cycle methods that implementations use to init(), start(), stop(), and destroy() the service. The daemon framework will invoke init() then start(). The instance of the DaemonApplication that is instantiated on startup survives for a long time. When calling stop() and destroy() the instantiation occurs again in a separate process while the first instantiation is still running. Meaning, the same object instance is not invoked when the service is stopped, neither is it even in the same process.

Bootstrappers

Section
Column

Each framework may have it's own interface for starting and stopping the Java service. Regardless of what method is called to start or stop we normalize these as calls against the DaemonApplication. Each framework's bootstrapper will have it's own Bootstrapper class which extends Bootstrapper. The Bootstrapper base class has some base implementations for instantiating and invoking methods on the DaemonApplication. Most Bootstrapper extentions can reuse these methods instead of implementing their own. The bootstrapper is usually instantiated by the daemon process for the framework after starting up a JVM. Also most bootstrappers will in addition to calling start() will invoke init() first even if the framework does not have init() in it's life cycle.

Column

Image Modified