[SERVERS]

Use the [SERVERS] section of the Uniface Router assignment file (urouter.asn) to specify the names (USTs) of Uniface Servers.

Syntax

[SERVERS]
UST {=} Executable {CommandLineSwitch |	ManagementSwitch}n} {ApplicationShell}

For example:

[SERVERS]
DEFAULT = c:\uniface\bin\userver.exe /maxidle=2h /dir=..\project

Arguments

  • UST—Uniface Server Type; name of the server. The name of the default or fallback UST is DEFAULT.
  • Executable—Uniface Server executable, (for example, userver).
  • CommandLineSwitch—command line switch and its value, for configuring the Uniface Server.
  • ManagementSwitch—special instructions to the Uniface Router for managing the Uniface Server.
  • ApplicationShell—name of the application shell (by default, userver.aps).

On iSeries, each command line switch and qualifier must be enclosed within single quotes.

Switches

The standard command line switches include (but are not limited to):

Management Switches

These switches can only be set on UST definitions. They cannot be set on the command line of a Uniface Server that is started manually. All switches can start with either / or -.

The following switches are applicable for both shared and exclusive Uniface Servers:

The following switches are applicable only for shared Uniface Servers:

The following switches are applicable only for exclusive Uniface Servers:

Description

Each UST defined in the Uniface Router assignment file serves as a command line string to start a userver process. This may result in a command line that exceeds the allowable command line length for your operating system, especially if the /dir and /dnp switches are used. You should therefore ensure that the length of the UST command line conforms to the limits for your platform.

On Linux and Unix platforms, if the UST command line is too long, it may not be reported to the Uniface Router. In this case, the urouter.log file may report that the userver was successfully started, but then fails to register and reports a timed-out error, the cause may be a UST command line that is too long, or that there is an error in the assignment file.

Tip: In this case, try starting the Uniface Server manually, using the same command line as specified in the UST definition and adding the /dnp and /drv qualifiers. This can sometimes produce a message from the shell that helps solve the problem.

Effect of /shr and /ex Switches

The Uniface Router can direct requests to shared or exclusive servers. By default, the Uniface Router accepts whatever the client asks for.

However, if the UST specifies a shared (/shr) or exclusive (/ex) server, the client request must match that, otherwise a warning or error message is returned.

Effect of /ex and /shr in Client and Uniface Router Assignment Files
File:   urouter.asn
Switch:

no switch

/ex

/shr

Client.asn

no switch

Shared (default)

Error message

Shared

/ex

Exclusive

Exclusive

Shared + Warning message

/shr

Shared

Error message

Shared

The following example assignment file shows a [SERVERS] section on Microsoft Windows:

[SERVERS]
DEFAULT = c:\uniface\bin\userver.exe /maxidle=2h /dir=..\project
SALES = c:\uniface\bin\userver.exe /asn=asv.asn /dir=..\home\kees /max=10 myaps.aps
HR = c:\uniface\bin\userver.exe /asn=asv.asn /max=50 /maxreq=100
PAYROLL = c:\uniface\bin\userver.exe /asn=usysadm:payrollasv.asn

The following example assignment file shows the same settings on Unix:

[SERVERS]
DEFAULT = userver -maxidle=2h -dir=../project
SALES = userver -asn=asv.asn -dir=../home/kees -max=10 myaps.aps
HR = userver -asn=asv.asn -max=50 -maxreq=100
PAYROLL = userver -asn=usysadm:payrollasv.asn

Related Topics