Petals ESB lifecycles

Introduction

Several concurrent life-cycles exist in Petals ESB:

Contributors
No contributors found for: authors on selected page(s)

The Petals ESB container life-cyle

The Petals ESB container life-cycle is very simple.

Full Size
A Gliffy Diagram named: Petals ESB lifecyle

It contains only one state: STARTED. The implicit state 'STOPPED' does not really exist because in such state no Petals ESB process is running.

The transition from state 'STOPPED' to 'STARTED' is realized using the Petals ESB startup script 'petals-esb'. The return to the state 'STOPPED' is realized using ^C or the command 'petals-esb stop'. See Starting and stopping Petals ESB.

When stopping a Petals ESB container, all its components are shutdown.

The shared-library life-cyle

The life-cycle

The shared-library life-cycle is simple.

Full Size
A Gliffy Diagram named: Shared-Library lifecyle

It contains only one state: INSTALLED. The implicit state 'UNINSTALLED' does not really exist because the shared-library is not instantiated or loaded.
The transition from state 'UNINSTALLED' to 'INSTALLED' is realized installing the shared library, and the return to the state 'UNINSTALLED' is realized uninstalling the shared-library. A shared library can be (un)installed using Petals CLI, the Petals Autoloader, Petals Ant Tasks or the JMX API.

Constraints

The shared library life-cycle is linked to the component life-cycle:

  • a shared library required by a component must be installed before to load the component
  • a shared library can not be uninstalled until a component requiring it is installed.
Component state installSharedLibrary uninstallSharedLibrary
UNLOADED
LOADED/UNINSTALLED
INSTALLED/SHUTDOWN
STOPPED
STARTED

The component life-cycle

The life-cycle

The component life-cycle is the more complex life-cycle of Petals ESB life-cycles. It is composed of two correlated sub life-cycles:

  • the component installer life-cycle that drives the installation of the component,
  • the component life-cycle itself.
Full Size
A Gliffy Diagram named: Component lifecyle

The state INITIALIZED is a temporary state in the startup transition. The transition init and start are automatically enchained when starting a component from the state SHUTDOWN.

Actions associated to states:

  • when initializing the component:
  • when starting the component:
    • it will be able to process request messages,
  • when stopping the component, no more request message is processed,
    • all resources (as database, pools, ...) used by the message processing are released,
  • when shutting down the component:
    • all resources (as database, pools, ...) used by the service unit (un)deployment on state STARTED and STOPPED are released,
    • the endpoints of the native services are unregistered.

Constraints

The component life-cycle is linked to:

  • the shared life-cycle,
  • the service-assembly lifecycle,
  • the service-unit life-cycle,
  • and have following constraint against the service-unit life-cyle:
    Service unit state loadNewInstaller install start stop shutdown uninstall unloadInstaller
    UNDEPLOYED
    SHUTDOWN
    STOPPED
    STARTED
    • component required by a service unit must be installed and running (ie. in state STOPPED or STARTED) before to deploy the service unit,
    • if service units are deployed on, a component can only be started or stopped. All service units must be undeployed before to try any other transitions.

The service-assembly life-cycle

The life-cycle

The service assembly life-cycle can be viewed as a wrapper of its all service unit life-cycles. It propose to drive the life-cycle of its service-units in on operation.

Full Size
A Gliffy Diagram named: Service-Assembly lifecyle

The transitions from state 'UNDEPLOYED' to 'SHUTDOWN' is realized deploying the service assembly, and the return to the state 'UNDEPLOYED' is realized undeploying the service assembly. A service assembly can be (un)deployed/started/stopped/shutdown using Petals CLI, the Petals Autoloader, Petals Ant Tasks or the JMX API.

Actions associated to states:

  • when deploying the service assembly, each service-unit not in state DEPLOYED is deployed,
  • when starting the service assembly, each service-unit not in state STARTED is started,
  • when stopping the service assembly, each service-unit not in state STOPPED is stopped,
  • when shutting down the service assembly, each service-unit not in state SHUTDOWN is shutdown,
  • when undeploying the service assembly, each service-unit not in state UNDEPLOYED is undeployed.

Constraints

The service assembly life-cycle is linked to the component life-cycle:

  • to realize a transition on the service-assembly life-cycle, the component must be in state STARTED or STOPPED.
Component state deploy start stop shutdown undeploy
UNLOADED
LOADED/UNINSTALLED
INSTALLED/SHUTDOWN
STOPPED
STARTED

The service-unit life-cyle

The service unit life-cycle is simple:

Full Size
A Gliffy Diagram named: Service-Unit lifecyle

The implicit state 'UNDEPLOYED' does not really exist because the service unit is not deployed.

Actions associated to states:

  • when deploying a provider service unit, its endpoint is registered,
  • when starting a service unit, consumption of services or external listening is started,
  • when stopping a service unit, consumption of services or external listening is stopped,
  • when undeploying a provider service unit, its endpoint is unregistered.
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.