2.1.2 Service Properties

The service.properties file located in the system subfolder configures the JSM services. It is a registry for the services used by the JSM. It is also can be used for controlling tracing and resources.

The service.properties file is loaded when the JSM starts. If the service properties change, you can reload the new changes by using Studio Refresh option as described in 2.6 Java Service Manager Refresh.

When the LANSA or RPG client requests that the JSM to load a service, only the name of the service is specified.

 

USE BUILTIN(JSM_COMMAND) WITH_ARGS('SERVICE_LOAD SERVICE(SMTPMailService)') TO_GET(#JSMSTS #JSMMSG)

 

When the JSM instance receives the SERVICE_LOAD command, the SMTPMailService servicename is prefixed with "service." The JSM searches the service.properties files. It uses the keyword SERVICE.SMTPMAILSERVICE to locate the class named com.lansa.jsm.service.SMTPMailService.

It is possible to associate a resource with this service by adding an entry with a "resource." prefix.

If a resource entry is present and the named resource file exists in the properties subdirectory, then this resource is passed to the service program via the JSMContainer getServiceResource() method.

If no resource entry exists, then the service name is used as the resource file name.

If no resource file exists, then an empty resource object is returned.