3.3.2Configuring services with property files

Services are configured via property-files residing in the folder <cmsWorks-installdir>/run/properties. cmsWorks has preconfigured services at delivery status after installation. The property bundles for a service always consists of

  • the package of the service, followed by the separator "/",
  • the service name itself, followed by the separator "/",
  • the parameter name, followed by "=" and
  • the parameter value

in one line. As example, one such line for the database service CMSDB consists of

  • "/com/topasworks/kernel/service/database/" (the package)
  • "CMSDB/" (the service name)
  • "JDBCKey=" (the parameter name)
  • "jdbc:mysql" (the parameter value)

in one line:

/com/topasworks/kernel/service/database/CMSDB/JDBCKey=jdbc:mysql

The property files contain descriptions for each service parameter and its functionality.

All services properties

Every service has by default some properties about starting and stopping the service. The server manager takes care of the running services and checks their states. Some services will take more more less time to allocate the needed resources or while stopping to close all used resources. So these times have to be configured for every service.

Entry

Value

Description

StartTimeout

1000

Time in milliseconds. After starting the service this is the time the server waits for checking that the service is running. If not, the service will be stopped.

StopTimeout

1000

Time in milliseconds. After stopping the service this is the time the server waits for checking that the service is stopped. If not, the service will be stopped forcefully.

AccessTimeout

1000

Time in milliseconds.

StopInformExtern

1

If the service was expectantly stopped this switch enables/disables to send an email to the configured email receivers for administration concerns reporting that this service was stopped. For instance if a database server is not available any more, the database service will stop and inform the administrators.

LogLevel

fatal error info debug

This is a list of log level names from the full set of [fatal error warn info debug trace] or all if all should be active. To disable some log levels is coming handy if the debug logging is very verbose but the service in a live server is running very reliable. For instance when logging all content, that a search service is indexing or searching for it creates so much data that nobody is going to examine it anyway. For finding some issues you can always turn on and off the logging without stopping the service.

Some services are derived AbstractHttpServer services (JSP container services). They have also some properties in common which will not be explained in detail in the actual services.

Entry

Value

Description

Port

8080

A JSP container service is a webservice that can be accessed by an HTTP request. So this service opens the port configured here to receive the request.

Htdocs

../htdocs/<servicepath>

This is the path in the file system where the static files and the JSP files are located. On a request the JSP container service will compile the jsp file to a Servlet class. Than it creates an instance of this class and executes this instance with the request. All further requests for this JSP will be processed by this instance multi threaded. If the JSP file is changed, the next request will start over compiling and executing the new instance of the Servlet. The path is relative to the JVM-Engine-Start-Folder <cmsWorks-installdir>/run.

DirectoryListAllowed

true

If set to false no filesystem content is delivered if the requesting URL targets a filesystem directory.

SessionsAllowed

true

If set to false all JSPs activating a Session cannot be compiled any more.

RelativeRedirectAllowed

true

true is the default. Otherwise the jetty creates absolute URLs when sending response.sendRedirect().

ResponseHeaderServer

<text>

Returns the license information on default as response header "Server".

ErrorResponseFooter

<text>

Returns the license information as a footer under the error message.

ErrorResponseCss

<text>

Replace the default css if more fancy error pages should be created.

MaxFormContentSize

 

A negative value is default. With this the Jetty handles it's predefined value. "max" is a value for unlimited form content size. Otherwise use a value in byte.