Application Configuration - fieldenms/tg GitHub Wiki

Application Configuraiton

TG applications are configured with a .properties file. Typically, one has a file named application.properties located in the app-web-server directory, which is then specified as the first argument on the command line to the Java application.

Application properties

This section describes parameters that can be specified in a .properties file to configure TG applications.

Email

  • email.smtp - address of the mail server where emails will be sent (e.g., for password reset).
    • A string matching pattern HOST(:PORT)?; the default port is 25.

Dynamic property access

This category of parameters controls various aspects of dynamic property access, which affects performance.

  • dynamicPropertyAccess.caching - one of {enabled, disabled, auto}.
  • dynamicPropertyAccess.typeCache - configures the main type cache (see cache parameters below)
  • dynamicPropertyAccess.tempTypeCache - configures the temporary type cache (see cache parameters below)

Cache parameters:

  • concurrEncyLevel - a non-negative decimal;
  • maxSize - a non-negative decimal;
  • expireAfterAccess - a duration specifier; Specifies that each entry should be automatically removed from the cache once a fixed duration has elapsed after the entry's creation, the most recent replacement of its value, or its last access.
  • expireAfterWrite - a duration specifier; Specifies that each entry should be automatically removed from the cache once a fixed duration has elapsed after the entry's creation, or the most recent replacement of its value.

Glossary:

  • Duration specifier - a non-negative decimal followed by a unit character.
  • Unit character - one of:
    • s - seconds;
    • m - minutes;
    • h - hours;
    • d - days;

Configuration example:

dynamicPropertyAccess.caching = ENABLED
dynamicPropertyAccess.typeCache.concurrencyLevel = 100
dynamicPropertyAccess.typeCache.expireAfterAccess = 12h
dynamicPropertyAccess.tempTypeCache.maxSize = 2048
dynamicPropertyAccess.tempTypeCache.expireAfterWrite = 10m