Date: Fri, 29 Mar 2024 01:13:25 +0000 (UTC) Message-ID: <1854586.10851.1711674805570@911f0a1bad02> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_10850_1954634085.1711674805570" ------=_Part_10850_1954634085.1711674805570 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
The Servoy Application Server comes bundles with an Java Service= Wrapper component, to facilitate the automatic launch of the Servoy Applic= ation Server when the server on which the Servoy Application Server is inst= alled is started or rebooted.
=20The Java = Service Wrapper does not start the required databases as the databases are = not part of the Servoy Application Server, could be running on a completely= different machine and different brands of databases have different mechani= sms to starting. For more information on running the bundled PostgreSQL as = a service, see the Postgre= SQL Primer tutorial.
=20When running the Servoy Application Server and the database on the same = Windows machine, both as a Windows Service, then a dependency can be config= ured between the different Windows services. See Configuring Windows Ser= vice dependencies for more info.
=20The Java Service Wrapper used by Servoy supports virtually all platforms= on which a Java Virtual Machine is available (also required to run the Ser= voy Application Server).
=20The Java service Wrapper component will create a Windows Service on the = Windows platform and on other platforms it utilized Unix Daemons.
= =20The Java Service Wrapper is by default installed by the Servoy= All-In-One installer when installing a Servoy Application Server (see Running the All-In= -One Installer for more info on the All-In-One installer).
=20During installation, an extra service directory is cr= eated in the ../application_server/ directory. This directory cont= ains, among others, the configuration file for the service, called wrapper.conf.
=20If the "Setup Service" option is checked in the installer, the Service w= ill actually be setup on the machine. By default this option is unchecked, = as in most cases the service configuration will require changes.
=20The Service component installation comes with two files to install and u= ninstall the Service: install_service.[bat/sh] and uninstall_service.[= bat/sh].
=20The configuration of the Java Service Wrapper is done through the file <= em>wrapper.conf located in ../application_server/service.
= =20When chan= ging the value of any any wrapper.ntservice.* property on Windows, the Serv= ice needs to be uninstalled first and reinstalled after the changes have be= en made.
=20By default the Windows Service is configured to be started manually. Thi= s can be changed by setting the wrapper.ntservice.starttype p= roperty to AUTO_START.
=20The Java Service Wrapper does NOT start the database, as in product= ion environments the database could be installed on a different machine or = is maintained by a DBA.
=20If the database is running on the same machine as a Windows Service as w= ell, it is possible to configure a dependency to it in the Java Service Wra= pper configuration. The dependency can be set by adding the name of th= e Windows Service for the database on which the Servoy Application Service = depends as a the wrapper.ntservice.dependency.x property. The= "x" at the end of the property name needs to be a sequential num= ber, starting with 1, for each dependency.
=20When the Servoy Application server is started as a service through the J= ava Service Wrapper, the assignment of memory goes through the configuratio= n of the wrapper in wrapper.conf, instead of through servoy_server= [bat/sh].
=20Below the mapping for the three relevant memory settings and their equiv= alent in the wrapper.conf:
=20For more information on the the meaning of these settings and their sugg= ested values, see Memory Mana= gement.
=20When running multiple Servoy Application Servers as a Service on a singl= e machine, some configuration adjustments are required to not let the diffe= rent services influence eachother.
=20Windows
=20The following property requires a unique value:
=20On Windows the wrapper.ntservice.displayname and = wrapper.ntservice.description could be modified to further d= istinguish the different Windows Services from each other. Note t= hat these two settings are just for display purposes in the Services overvi= ew in Windows and do not affect the actual operation of the services.
= =20OSX/*nix
=20On OSX and *nix, the name used for the deamon is configured in ServoySer= ver:
=20# Applicat= ion APP_NAME=3D"ServoyServer" APP_LONG_NAME=3D"Servoy Application Server"=20
The APP_NAME has to be unique for each Service.
=20All platforms
=20The wrapper.port value does not have to be unique, because= the Java Service Wrapper automatically looks for a free port if the specif= ied port is already taken.
=20The Java Service Wrapper has extensive configuration options. The most f= undamental settings have been discussed in this chapter already. In this pa= ragraph some more advanced settings are detailed.
=20Perform custom action on OutOfMemory exceptions
=20Java process need to be explicitly told how much memory they are allowed= to use. In case the process requires more memory than it's allowed to use = based on the configuration, Java will throw OutOfMemory exceptions. When th= is happens, the state of the process becomes unreliable, as some= vital business logic might not have been executed. Java only has limited o= ptions to take action when OutOfMemory exceptions occur.
=20The Java Service Wrapper however support a monitoring feature that is ca= pable of taking action in case OutOfMemory exceptions occur. The following = snippet of configuration will perform a thread dump and then a restart of t= he Servoy Application Server.
=20wrapper.fi= lter.trigger.1=3DException in thread "*" java.lang.OutOfMemoryError wrapper.filter.action.1=3DNONE wrapper.filter.trigger.2=3DException in thread "*" java.lang.OutOfMemoryErr= or wrapper.filter.allow_wildcards.2=3DTRUE wrapper.filter.action.2=3DDUMP,RESTART wrapper.filter.message.2=3DThe JVM has run out of memory.=20
The Java Service Wrapper is a bundled third party component also called = Java Service Wrapper Standard by <= a href=3D"http://www.tanukisoftware.com/en/index.php" class=3D"external-lin= k" rel=3D"nofollow">Tanuki Software. For indepth documentation have a l= ook here.
=20The component is licensed by Servoy to be bundled and used in combinatio= n with the Servoy Application Server only. It's not allowed to use the comp= onent outside the context of the Servoy Application Server.