Skip to main content
Version: 5.x

Launch parameters

Application server (Server)

Java

Java application server startup parameters are set in the launch command (for example, for manual or automatic installation):

NameTypeDescriptionDefault
System (starting with X)StandardStandard Java parameters. It is important above all to pay attention to:
  • cp - classpath, the paths in which java looks for class files and other resources (including lsFusion modules). The default is . - current folder (different for automatic installation).
  • Xmx - maximum memory size. The default value is determined depending on the configuration of the computer on which the application server is running. For complex logics, it is recommended that you allocate at least 4GB.
-XX:CMSInitiatingOccupancyFractionintIn general, this is the standard parameter responsible for the threshold after which the CMS garbage collector is turned on. At the same time, the platform uses this parameter to target the memory usage amount using LRU caches (setting more aggressive parameters for cleaning them if this goal is exceeded, and less aggressive in the opposite case). For heavily loaded servers, it is recommended that you set it in the range from 40 to 60.70
Custom (starting with D)-Dlsfusion.server.lightstartboolean"Light" start mode (usually used during development). In this mode, the server does not perform metadata synchronization operations or create security policy settings forms, etc., and the startup time and the amount of memory consumed at startup are therefore reduced.
In the IDE it is set with a checkmark in lsFusion server configuration (enabled by default).
false
-Dlsfusion.server.devmodebooleanDevelopment mode. In this mode:
  • System tasks are not launched (so as not to interfere with the debugger)
  • You can edit report design in interactive print view
  • Anonymous access to the API and UI is enabled (system parameters enableAPI, enableUI). In addition, anonymous access in this mode is as an admin and not an anonymous user
  • Client is automatically reconnected when connection is lost
  • The cache for reading reports from resources is turned off
In the IDE, automatically enabled when running lsFusion server configuration.
false
-Dlsfusion.server.testmodebooleanEnables some experimental features
Automatically enabled if assertions are enabled (-ea option)
false

lsFusion

lsFusion startup parameters for server applications can be set in one of the following ways (in the order of their priorities, lower priority at the bottom):

  • In the resources in the lsfusion.xml file in the places where these parameters are used, after: (relevant for platform forks)
  • In lsfusion.properties (usually part of a project, which means it acts by default for all installations)
  • In conf/settings.properties (for specific installations)
  • In the Java startup options (starting with D, e.g. -Dlogics.topModule=FFF)
NameTypeDescriptionDefault
db.server, db.name, db.user, db.password, db.connectTimeoutstring, string, string, string, intDatabase server connection parameters:
  • db.server - the address of the database server (plus, if necessary, the port after a colon, for example localhost:6532)
  • db.name - database name
  • db.user - username to connect to the database server
  • db.password - user password to connect to the database server
  • db.connectTimeout - DBMS connection timeout
localhost, lsfusion, postgres, , 1000
rmi.port, rmi.exportName, http.portint, string, intAccess settings for the application server:
  • rmi.port - port for the application server (RMI register / objects exported)
  • rmi.exportName - name of the application server (the root RMI object exported by it). It makes sense to use it if you need to export several logics on one port
  • http.port - port for the web server embedded in the application server (used for access from external systems)
7652, default, 7651
logics.includePaths, logics.excludePaths, logics.topModule, logics.orderDependenciesstring, string, string, stringParameters of the project (which modules to load and in what order, detailed description here)logics.includePaths equals *, others blank
user.country, user.language, user.timezone, user.twoDigitYearStart (user.setCountry, user.setLanguage, user.setTimezone)string, string, string, intStandard Java parameters defining locale parameters (regional settings - language, country, etc., detailed description here)
Due to the peculiarities of Java Spring (namely, locale parameters are considered by Java Spring to be set even if they are not explicitly specified in the start command, that is, settings of these parameters in .properties files are ignored), the platform supports "clones" of these parameters that start as set: if they are specified (either in .properties files or in the launch string), they "overload" the native parameters. That is, the priority is OS, -Duser.*, User.set* in .properties files and -Duser.set* (none of the above applies to user.twoDigitYearStart, since it is not a standard Java parameter)
The first three are determined from the operating system settings, current year minus 80
db.namingPolicy, db.maxIdLengthstring, intParameters of the naming policy for tables and fields:db.namingPolicy - the name of the java class of the property (full name, with package); in the constructor, it must accept one parameter of type int - the maximum size of the name.Builtin policy class names:
  • Complete with signature - lsfusion.server.physics.dev.id.name.FullDBNamingPolicy
  • Complete without signature - lsfusion.server.physics.dev.id.name.NamespaceDBNamingPolicy
  • Brief - lsfusion.server.physics.dev.id.name.ShortDBNamingPolicy
db.maxIdLength - maximum size of a table or field name. Passed as the first parameter to the constructor of the java class of the naming policy for tables and fields.
Complete with signature, 63
db.denyDropModules, db.denyDropTablesboolean, booleanBan on deletion at startup:
  • db.denyDropModules - modules
  • db.denyDropTables - tables
false, false
logics.initialAdminPasswordstringDefault admin password

Example conf/settings.properties file (section 3):

$FUSION_DIR$/conf/settings.properties

db.server=localhost
db.name=lsfusion
db.user=postgres
db.password=pswrd

rmi.port=7652
info

By default, it is assumed that the startup parameter files conf/settings.properties and lsfusion.properties are located in the application server's startup folder. However, with automatic installation under GNU Linux symlinks for these files (as well as for log folders) are automatically created to other files whose layout is better aligned with Linux ideology.

Web server (Client)

Java

Java web server startup parameters are set in the Tomcat launch command, which, in turn, launches this web server (for example, for automatic installation).

NameTypeDescription
System (starting with X)StandardStandard Java parameters. It is important above all to pay attention to:
  • Xmx - maximum memory size. For complex logics, it is recommended that you allocate at least 2GB.

lsFusion

lsFusion startup parameters for the web server can be set in one of the following ways (in the order of their priorities, lower priority at the bottom):

  • In web applications' context parameters:
    • in a web application in the file /WEB-INF/web.xml, the context-param tag (relevant for platform forks)
    • in a web application in the file /META-INF/context.xml, Context tag, Parameter tag (relevant for platform forks)
    • in Tomcat, in the file $CATALINA_BASE/conf/[enginename]/[hostname]/[contextpath].xml, tag Context, tag Parameter, where:
      • $CATALINA_BASE$ is the folder where Tomcat is installed (for example, with automatic installation, this folder is $INSTALL_DIR/Client)
      • [contextpath] - contextual path of the web application (for example, with automatic installation this name is empty by default, which in Tomcat is equivalent to the name ROOT; with manual installation it depends on the name of the war file),
      • [enginename] and [hostname] are the names of the tomcat implementation mechanism and the web server computer (for example, with automatic installation these names are catalina and localhost respectively)
    • in Tomcat, in the file $CATALINA_BASE/conf/server.xml, Context tag, Parameter tag (not recommended)
  • In URL parameters (e.g. http://tryonline.lsfusion.org?host=3.3.3.3&port=4444)
NameTypeDescriptionDefault
host, port, exportNamestring, int, stringConnection settings for the application server. Must match the access parameters for the application server.
  • host - application server address
  • port - port of the application server. Must match the parameter rmi.port
  • exportName - name of the application server. Must match the parameter rmi.exportName
localhost, 7652, default

Example Tomcat configuration file (section 3 in context parameters):

$CATALINA_BASE/conf/[enginename]/[hostname]/ROOT.xml

<?xml version='1.0' encoding='utf-8'?>
<Context>
<Parameter name="host" value="localhost" override="false"/>
<Parameter name="port" value="7652" override="false"/>
</Context>
info

In addition to the launch parameters, the platform also has system parameters which are set a little differently and are relevant mainly for processes of various components of the platform (that is, processes that occur after they are launched).