Configure the SICS Batch Server Environment
Required knowledge #
Most SICS Batch Server configuration is specified using XML files. You should be familiar with syntax rules for well formed XML, and be able to comment and uncomment XML fragments.
Suggested configuration order #
| Step | Description |
|---|---|
| 1 | Configure logging |
| 2 | Configure security |
| 3 | Configure schedulers |
| 4 | Configure user authorization interface |
Configure logging #
Configure Log file Destination #
Logging in SICS is done using the Apache Log4j 2 library and is configured using a file called log4j2.xml. The default installation will write the logs to the working directory. If you use Tomcat 10 the working directory will be %CATALINA_HOME% and it will write the following logs:
SicsBatchServer.log- Contains SICS Batch Server relevant messages. This log can be used to monitor the overall activity for example information regarding logon and startup/shutdown.
This log should not be turned off and it’s configured so it’s not relevant to change log level.SQL.log- Contains the SQL sent to the database. This log is by default turned off.
As said above the logs are written to the working directory. If you have followed the default installation of Tomcat 10.x this will be%CATALINA_HOME%/logs/SicsBatchServer.
If you want to change the location you should do the following:
-
Open
%CATALINA_HOME%/webapps/sbs/WEB-INF/classes/log4j2.xmlin a text editor. -
Locate the
fileName="file"attribute for the log you want to change location, for example for theSicsServer.logit is the element:<RollingFile name="sicsBatchServer" fileName="logs/SicsBatchServer/SicsBatchServer.log" -
Change the value to the file path of your choice, for example:
fileName="D:/logs/SicsBatchServer/SBS.log"
Turn on SQL logging #
Please see the SICS API Server installation documentation for details.
Configure Performance.log #
Please see the SICS API Server installation documentation for details.
More information on log4j2 #
For more information about how to configure log4j2, see https://logging.apache.org/log4j/2.x/
Configure security #
By default the SBS Admin page can only be accessed by SICS users who have access to the SICS use case “Scheduled Jobs”:

You can turn off the security check by setting the context parameter ProtectAdminPages to false:
-
Open the
%CATALINA_HOME%/webapps/sbs/WEB-INF/web.xml. -
Locate the
ProtectAdminPagesparameter and set the value tofalse:<context-param> <description> Set this flag to true if you want all users of the admin pages to be checked against SICS and to verify that they have the "Scheduled Jobs" use case. Set it to false otherwise. </description> <param-name>ProtectAdminPages</param-name> <param-value>false</param-value> </context-param> -
Restart the web application.
Configure Secure Connection (HTTPS/SSL) #
SICS Batch Server can be configured to always use a secure connection. By adding the security-constraint element in the %CATALINA_HOME%/webapps/sbs/WEB-INF/web.xml, any access via HTTP will automatically be redirected to HTTPS.
<security-constraint>
<web-resource-collection>
<web-resource-name>SICS Batch Server</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
Configuring SCHEDULER #
Introduction #
Which schedulers to use and some aspects of how the scheduler should work can also be configured.
Specifying scheduler names #
When starting a scheduler from SICS Sys Admin you can specify which scheduler to use.
In SICS Batch Server you can specify the name of the schedulers in the SchedulerNames parameter:
-
Open the
%CATALINA_HOME%/webapps/sbs/WEB-INF/web.xml. -
Locate the
SchedulerNamesparameter and set the value to a list of valid scheduler names separated by semicolons;. In the example below SICS Batch Server will prepare theOYSTEINandSTEINARschedulers. Their status will be set to “paused”. For starting them at startup, please refer to paragraph 9.5.5<context-param> <description> Names of the schedulers to be allocated at startup, separated by semicolon (;) Each element must match the name of a scheduler defined in SICS SysAdmin. </description> <param-name>SchedulerNames</param-name> <param-value>OYSTEIN;STEINAR</param-value> </context-param> -
Restart the web application.
Specifying the type of refresh between jobs #
When starting a scheduler from SICS Sys Admin you can specify whether the system should do a full or a light refresh between jobs using “Light Refresh” tick box:
The default value in SICS Sys Admin and in SICS Batch Server is full refresh between jobs.
In SICS Batch Server you specify this using the RefreshStrategy parameter:
-
Open the
%CATALINA_HOME%/webapps/sbs/WEB-INF/web.xml. -
Locate the
RefreshStrategyparameter and set the value:<context-param> <description> Specify the what kind of refresh should be done between jobs. Possible values: * FullRefreshBetweenJobs * LightRefreshBetweenJobs </description> <param-name>RefreshStrategy</param-name> <param-value>LightRefreshBetweenJobs</param-value> </context-param> -
Restart the web application.
Specifying idle period between jobs #
If no jobs are waiting to be processed by the scheduler it will go idle for a period before looking for new jobs to process.
By default it waits 60 seconds.
This value can be changed using the IdlePeriodInSeconds parameter:
-
Open the
%CATALINA_HOME%/webapps/sbs/WEB-INF/web.xml. -
Locate the
IdlePeriodInSecondsparameter and set the value to for example30seconds:<context-param> <description> The number of seconds the scheduler is idle before it starts to look for available jobs after finishing all available jobs. </description> <param-name>IdlePeriodInSeconds</param-name> <param-value>30</param-value> </context-param> -
Restart the web application.
Specifying whether to start scheduler when web app starts #
By default the specified scheduler will be started when the SICS Batch Server web app starts.
It is possible to configure whether it should start or not using the StartSchedulersOnStartup parameter:
-
Open the
%CATALINA_HOME%/webapps/sbs/WEB-INF/web.xml. Locate theStartSchedulersOnStartupparameter and set the value totrueorfalse:<context-param> <description> Indicate whether schedulers listed in the SchedulerNames parameter should start when the SBS instance is started. Default value is 'false'. </description> <param-name>StartSchedulersOnStartup</param-name> <param-value>false</param-value> </context-param> -
Restart the web application.
Specify the User Authorization Interface implementation to be used #
If the User Authorization Interface option is turned on in the database, a User Authorization Interface implementation must be specified.
This setting is the SICS Batch Server equivalent for UserAuthorizationInterface configuration value in sics.global.resource.registry.properties for SICS4 Workstation and System Administration Console.
It’s possible to specify the class to be loaded as follows:
-
Open
%CATALINA_HOME%/webapps/sbs/WEB-INF/web.xmlin a text editor -
Navigate to the context parameter
UserAuthorizationInterface. -
Change the canonical classname:
<context-param> <param-name>UserAuthorizationInterface</param-name> <param-value>any.custom.Implementation</param-value> </context-param>
Configure the User Exit implementation to be used. #
If the Call User Exit option is turned on in the Event Log Setup, the user exit implementation is used.
To configure the Batch Server to use a custom User Exit implementation, please update the context parameter named UserExitImplementation in WEB-INF/web.xml with the canonical classname of your custom implementation.
The custom class must implement com.csc.cnu.base.domain.eventlog.impl.SicsUserExitInterface.
The DXC-provided default implementation does nothing.
<context-param>
<param-name>UserExitImplementation</param-name>
<param-value>any.custom.Implementation</param-value>
</context-param>
Additional Information #
Application managed database connection #
Complete the following steps to set up application managed connections to the database:
- Define and test a database connection in the file
sics-database-sources.xmlused by SICS workstation. - On success, copy the connection entry to file
%CATALINA_HOME%/webapps/sbs/WEB-INF/classes/sics-database-sources.xml. - Copy the required JDBC jar(s) into
%CATALINA_HOME%/webapps/sbs/WEB-INF/lib(similar to the same step for 6.1 “Configure database connection”). - Uncomment and specify the following servlet init parameters in
%CATALINA_HOME%/webapps/sbs/WEB-INF/web.xml:
| Parameter | Required | Description |
|---|---|---|
DATABASE |
Yes | The name attribute of the connection specified in %CATALINA_HOME%/webapps/sbs/WEB-INF/classes/sics-database-sources.xml |
USER |
Yes | Database user name, same as you would enter in the login screen in SICS Sys Admin Workstation. |
PASSWORD |
Yes | Database password of the user described above. The password may be encrypted. In the SICS installation folder, there is a file named encrypt.bat. This bat file takes a plain-text string (the password) as input, calls a SICS utility program and outputs an encrypted version of the string. This encrypted value will always be prefixed with % so as to later recognize it as an encrypted value. Such an encrypted password can be provided in the PASSWORD field in web.xml. Remember to include the % prefix. |
ENVIRONMENT |
No | Database schema with SICS data, see closer description under 6.1 “Configure database connection”. |
OS_AUTHENTICATION |
No | Set to Y (for Yes) to use OSAUTHENTICATION (in which case the above PASSWORD is not needed) or N (for No) to use a PASSWORD-authenticated login. The authentication method depends on how the USER is defined in the (Oracle or SQL Server) database server. |