The Boot Procedure

At startup, the application searches for configuration files at predefined locations, e.g., to be able to connect to the database.

The following section describes how the application starts (boot item).

  • The application looks in the webapps directory of the servlet container for a file named Torque.<context>.properties. For example, if the application is installed under webapps/demo, it would look for the file Torque.demo.properties. This allows you to run multiple instances in the same container.

  • If this file is found, the database connection configuration will be taken from there. Within this file, the application searches for a property named TRACKPLUS_HOME. If this property is found, this value is used for the home directory until the database connection is established. After the database connection is established, the value is taken from the database. If it is undefined, the database is initialized with the value of TRACKPLUS_HOME.

  • If TRACKPLUS_HOME has not yet been set at this point, the application looks for an environment variable like TRACKPLUS_BOOT. If this is found, the application looks in the corresponding directory for a file Torque.properties. If it is found, this configuration is used to establish the database connection.

  • Within this file the application looks for a property named TRACKPLUS_HOME. It will use this value, if it exists, until it is overridden by the database configuration. If the database has not yet been configured, the TRACKPLUS_HOME value is used to initialize the database.

  • If either TRACKPLUS_BOOT or Torque.properties are not found, the application searches for an environment variable called TRACKPLUS_HOME.

  • If this is found, the application searches for a file Torque.properties in the corresponding directory. If this file is found, the database connection is established with this configuration.

  • Within this file, the application looks for a property named TRACKPLUS_HOME. It will use this value, if it exists, until it is overridden by the database configuration. If the database has not yet been configured, the TRACKPLUS_HOME value will be used to initialize the database.

  • If at this point TRACKPLUS_HOME has not yet been set, the classpath will be searched for a Torque.properties file in the class path. Since there is a default configuration in the file then found, the application will not normally work.