What is an installer and how does it differ from a regular component?

An installer is a special component that performs one or more installation tasks. Technically, an installer is represented by a simple class with 2 special attributes:

  1. the @Installer annotation that identifies the installer and defines the basic metadata for executing the installer: at what point and under which conditions;
  2. one or more parameter-less methods annotated with @InstallerMethod. These represent the actual tasks the installer should perform.

Installers are created just like other beans and can access any other component visible. The major differences with regular module components are:

  • installer components are created only if the necessary conditions are true;
  • installer components are created in a separate ApplicationContext that only exists during the bootstrapping of the Across application. Once the application has fully started, all installers will be removed from the memory.

The phase to which an installer is attached will determine which components from other modules it can use.

When you want to use installers, a single RDBMS (database) is required for Across to track installer state between application runs. At the same time a simple locking mechanism will be used on the database so multiple applications using the same RDBMS can rely on installers being executed only once.

See the reference documentation section on Installers for more details.