Skip navigation links

Package com.kabira.platform.component

Component support.

See: Description

Package com.kabira.platform.component Description

Component support.

A component is a jar file. It is identified as a component by the addition of a properties file named ast.properties to the top level of the jar, or in any class path top level directory.

At JVM startup all components found in the class path will be automatically activated. Components are activated in the order they are found in the class path.

Component activation occurs before main.

Component deactivation occurs automatically during JVM shutdown.

A component may contain configuration files.

A component may contain state change notifiers.

Properties File

The ast.properties file supports the following properties:

Example:

 
 Configuration-Files      my/company/configuration/endpoints.kcs, \
                          my/company/configuration/states.kcs

 Component-Notifiers      my.company.component.Notifier
 
 

Configuration Files

Configuration files are automatically loaded and activated at component activation time.

Configuration files are loaded and activated in the order listed in the Configuration-Files property.

Component activation fails if a configuration file cannot be found, or if there is a configuration load or activate error.

Configuration files are automatically deactivated and unloaded as the component is shutdown. Deactivation failures are ignored.

Notifiers

Notifiers are invoked in the order specified in the Component-Notifiers property.

Component activation fails if the notifier class cannot be found.

A single instance of each notifier is instantiated and is used from activation through deactivation of the component.

Component activation fails if a class specified in Component-Notifiers does not extend Notifier

The execution order of the terminate notification and Runtime shutdown hooks is undefined.

A ComponentException thrown by an initialization notifier causes component activation to fail.

Startup Sequence

A transaction is started.

For each component found within the class path the following steps occur in order:

The transaction is committed.

main is executed.

Startup Failure Handling

If the startup sequence fails, the following cleanup occurs:

Shutdown Sequence

For each component activated at JVM startup, in reverse from which it was activated, the following steps occur in order:

Skip navigation links
Copyright 2008-2015 Cloud Software Group, Inc.