Child pages
  • Running the Server As a Service

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

While the Java Service Wrapper used by Servoy supports virtually all platforms on which a Java Virtual Machine is available (also required to run the Servoy Application Server), in Servoy up to Servoy 6 it's only installed properly on Windows. As of Servoy 6 the service component is properly installed on Windows, OSX and other *nix flavors. For more info on the Java service Wrapper see the paragraph #More info on the Java Service Wrapper component below.

The Java service Wrapper component will create a Windows Service on the Windows platform and on other platforms it utilized Unix Daemons.

...

When checked during the installation, an extra service directory is created in the ../application_server/ directory. This directory contains, among others, the configuration file for the service, called wrapper.conf.

After installation through On the Windows platform the Windows Service will be automatically installed when the All-In-One installer , on the Windows platform has finished. 

Additional configuration

The configuration of the Java Service Wrapper is done through the file wrapper.conf located in ../application_server/service.  

...

Configuring the Windows Service to automatically start on reboot of the machine 

By default the windows Windows Service is configured to be started manually. This can be changed by setting the wrapper.ntservice.starttype property to AUTO_START.

...

If the database is running on the same machine as a serviceWindows Service as well, it is possible to configure a dependency to it in the Java Service Wrapper configuration. the The dependency can be set by adding the name of the Windows Service for the service 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 number, starting with 1, for each dependency.

...

When the Servoy Application server is started as a Service service through the Java Service Wrapper, the assignment of memory goes through the configuration of the wrapper in wrapper.conf, instead of through servoy_server.bat/server_server.sh.

...

  • wrapper.ntservice.name (default ServoyService, Windows only)

On Windows the wrapper.ntservice.displayname and wrapper.ntservice.description could be modified to further distinguish the different windows Windows Services from each other. Note that these two settings are just for display purposes in the Services overview in windows Windows and do not affect the actual operation of the services.

...

The Java Service Wrapper has extensive configuration options. The most fundamental settings have been discussed in this chapter already. In this paragraph some more advanced settings are detailed.

Perform custom action on OutOfMemory exceptions

Java process need to be explicitly told how much memory they are allowed to use. In case the process required requires more memory than it's allowed to use , based on the configuration, Java will throw OutOfMemory exceptions. When this happens, the state of the process becomes unreliable,  as some vital business logic might not have been executed. Java only has limited options to take action when OutOfMemory exceptions occur.

The Java Service Wrapper however support a monitoring feature that is capable of taking action in case OutOfMemory exceptions occur. The following snippet of configuration will perform a thread dump and then a restart of the Servoy Application Server in case of OutOfMemory Exceptions.

Code Block
wrapper.filter.trigger.1=Exception in thread "*" java.lang.OutOfMemoryError
wrapper.filter.action.1=NONE

wrapper.filter.trigger.2=Exception in thread "*" java.lang.OutOfMemoryError
wrapper.filter.allow_wildcards.2=TRUE
wrapper.filter.action.2=DUMP,RESTART
wrapper.filter.message.2=The JVM has run out of memory.

...

The component is licensed by Servoy to be bundled and used in combination with the Servoy Application server Server only. It's not allowed to use the component outside the context of the Servoy Application Server.