### Lifecycle States within the JBI Environment

Stateful JBI artifacts such as Binding Components, Service Engines, and Service Assemblies, are managed for the whole domain (repository and one or more targets) and can also be managed per target.

Within a cluster environment, JBI components and Service Assemblies can have the following status in a domain:

- Enabled on all targets

  The component or Service Assembly is running on all the targets.

- Disabled on all targets

  The component or Service Assembly is shutdown (or stopped) on all the targets.

- Enabled on {n} targets

  The component or Service Assembly is started on some of the targets (but shutdown on at least one target).

- No targets

  The component or Service Assembly is installed on a target.

  The component or Service Assembly is installed or deployed to only the domain repository (and not any targets).

On a particular target (a cluster or a standalone server instance), JBI components and Service Assemblies can have the following lifecycle states:

- Started

  The component or Service Assembly has been successfully started and is running on the target (in the case of a cluster, it is running on all the instances in the cluster).

- Stopped

  The component or Service Assembly has been stopped (which implies it was previously started). See the component documentation for the use of this state.

- Shutdown

  The component or Service Assembly has been shut down. In this state, the component can be uninstalled and the Service Assembly can be undeployed.

The JBI Runtime persists the lifecycle states of JBI components and Service Assemblies. When the application server shuts down and then restarts, JBI components and Service Assemblies revert to their state at the time the application server shut down.

Note - When the Application Server restarts, the JBI runtime attempts to revert to the "desired" state of a JBI component or a Service Assembly. For example, suppose you tried to start a JBI component but it did not start due to an error in the component. If you restart the Application Server, the JBI runtime attempts to start the component again.