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_data or for setting up server processes.

XML Configuration


Note: If you want to modify the configuration file for a service directly in the file system, you will find the appropriate file in the configuration file ./etc/factory.xml. Details about the configuration can be found in the respective documentation of a service. Otherwise, you can edit the configuration file directly via the respective service in the GUI.

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.

Setting a RemotePrintClient


If the Integration Server itself is to function as a RemotePrintClient, start a corresponding startup application that logs on to the system like a remote client and waits for incoming print jobs.

For this (actually local) client, a corresponding setting must, of course, be made within the RemotePrintServices as described in the corresponding section.

The following XML fragment adds the startup application intended for initialising a print client.

<Call name="addApplication">
<Arg>
<New class="com.ebd.hub.services.remoteprint.RemotePrintStartupClient">
<Set name="verbose">false</Set>
<Set name="machineID">username</Set>
<Set name="authcode">password</Set>
<Set name="serverServiceURL">http://127.0.0.1/rps/PrintJobRetrieve/</Set>
</New>
</Arg>
</Call>


The parameters have the following meaning.

Parameter

Description

verbose

If extended log messages are to be made, this parameter must be set to true. Otherwise, it can remain at the value false.

machineID

The user name to use for authentication.

authcode

The password to use for authentication.

serverServiceURL

The URL to use for the communication with the server. The exact structure of the URL depends on the settings made via setContext in the RemotePrintService.

Defining Startup Applications


images/download/attachments/62856393/Services_18_EN-version-1-modificationdate-1605685908439-api-v2.png


(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.