StartupService
The StartupService is used to start applications at the startup time of the Integration Server. This can, for example, be used for initialising Lobster Integration or for setting up server processes.
XML configuration
Important note: The availability of a service depends on the license purchased and whether the service has been registered in the configuration file ./etc/factory.xml of the Service Factory (changes require server restart!). There you will also find the responsible configuration file for a service, otherwise you can also edit the configuration file of the service directly in the GUI of the service (changes require a service restart!).
Adding a startup application
The following XML fragment adds an application to the StartupService.
<
Call
name
=
"addApplication"
>
<
Arg
>
<
New
class
=
"class_name_of_the_startup_application_to_be_started]"
>
[possibly necessary settings of the startup application]
</
New
>
</
Arg
>
</
Call
>
Following are the startup applications that are part of the Integration Server.
Activating the "GUIServerLogEraser"
The GUIServerLogEraser is used to delete old GUIServer log entries. The following XML fragment adds it to the StartupService.
<
Call
name
=
"addApplication"
>
<
Arg
>
<
New
class
=
"com.ebd.hub.services.startup.guiserver.GUIServerLogEraser"
/>
</
Arg
>
</
Call
>
Further configuration is not required here.
Enabling mail notification when the server shuts down
If an email is to be sent to a specified list of recipients when the Integration Server shuts down, this can be done via the "ShutdownApplication". The following XML fragment adds it to the StartupService.
<
Call
name
=
"addApplication"
>
<
Arg
>
<
New
class
=
"com.ebd.hub.services.startup.shutdown.ShutdownApplication"
/>
</
Arg
>
</
Call
>
Further configuration takes place in the configuration file ./conf/shutdown.properties. The structure of the file is described in section Format of the ShutdownApplication configuration file.
Setting the default values for the "MailManager"
In order to simplify the sending of emails from applications, the Integration Server offers the so-called MailManager. In order for it to be able to send mails, it must be informed about the mail server to be used and any necessary authentications. There is a startup application for this, which can be integrated into the StartupService. This is done via the following XML fragment.
<
Call
name
=
"addApplication"
>
<
Arg
>
<
New
class
=
"com.ebd.util.net.mail.HubStartupConfiguration"
>
<
Call
name
=
"setMailSettings"
>
<!--SMTP via TLS should be used
<
Arg
>smtps</
Arg
>
-->
<
Arg
>hostname</
Arg
>
<
Arg
type
=
"int"
>port</
Arg
>
<
Arg
>username</
Arg
>
<
Arg
>password</
Arg
>
</
Call
>
<!-- Uncomment the next line and set with fitting values to change the list of mechanisms to be used for authentication -->
<!--
<
Set
name
=
"sMTPAuthMechanisms"
>LOGIN PLAIN MD5-DIGEST NTLM</
Set
>
-->
</
New
>
</
Arg
>
</
Call
>
The parameters have the following meaning.
Parameter |
Description |
hostname |
The host name of the SMTP server to use. |
port |
The port on which the SMTP server waits for incoming requests. Usually, that is port 25. |
username |
The user name to use for authentication. |
password |
The password to use for authentication. |
Note: If no authentication is necessary, for example because this is an SMTP server that can only be reached internally, the last two arguments can be completely omitted when calling, so that only two arguments are passed.
Defining startup applications
(1) List of applications. The class name, the status and the timestamp of the last startup are displayed.
(2) An application can be started, stopped and removed via the context menu.
Log level dependencies
Changes to the log level of the LogService have no influence on the logging behaviour of the StartupService. Similarly, setting the verbose mode has no effect.