View Source

h1. Introduction

{section}
{column}

Several concurrent life-cycles exist in Petals ESB:
* [the Petals ESB life-cycle|#petals-esb-lifecycle],
* [the shared-library life-cycle|#sharedlibrary-lifecycle],
* [the component life-cycle|#component-lifecycle],
* [the service-assembly life-cycle|#service-assembly-lifecycle],
* [the service-unit life-cyle|#service-unit-lifecycle].

{column}
{column:width=35%}
{panel:title=Table of contents}{toc:outline=true}{panel}
{panel:title=Contributors}{contributors:order=name|mode=list|showAnonymous=true|showCount=true|showLastTime=true}{panel}
{column}
{section}

{anchor:petals-esb-lifecycle}
h1. The Petals ESB life-cyle

The Petals ESB life-cycle is very simple.
{gliffy:name=Petals ESB lifecyle|version=2}
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].

{anchor:sharedlibrary-lifecycle}
h1. The shared-library life-cyle

h2. The life-cycle

The shared-library life-cycle is simple.
{gliffy:name=Shared-Library lifecyle|version=3}
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|petalsesb:Command Line Interface], [the Petals Autoloader|Petals ESB "Autoloader"] or the JMX API.

h2. 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.

{caption:Shared library life-cycle constraints}
|| Component state || installSharedLibrary || uninstallSharedLibrary ||
| UNLOADED | !checkOk.png! | !checkOk.png! |
| LOADED/UNINSTALLED | !checkErro.png! | !checkErro.png! |
| INSTALLED/SHUTDOWN | !checkErro.png! | !checkErro.png! |
| STOPPED | !checkErro.png! | !checkErro.png! |
| STARTED | !checkErro.png! | !checkErro.png! |
{caption}

{anchor:component-lifecycle}
h1. The component life-cycle

The component life-cycle is the more complex life-cycyle of Petals ESB life-cycles. It is composed of two correlated sub life-cycles:
{gliffy:name=Component lifecyle|version=4}

{anchor:service-assembly-lifecycle}
h1. The service-assembly life-cycle

{anchor:service-unit-lifecycle}
h1. The service-unit life-cyle