|
|||||
|
||||||
Related Topics | Other Library Functions |
function |
wsb.create-server |
Library: Web Services Broker (OMWSB)
Import: omwsb.xmd |
Return type: wsb.server
Returns: A |
export external server function create-server on value integer port of-type value integer type default-min-threads value integer min-threads optional initial {1} default-max-threads value integer max-threads optional initial {50} max-queue-length value integer queue-length optional initial {25} timeout value integer timeout optional initial {2500} using-unique-directories value switch unique-dir optional initial {false} using-working-directory value string directory optional
Argument definitions
The wsb.create-server
function is used to create a WSB server which can then be used to accept requests on the specified port, identify known valid requests and deliver them to the service applications for handling. wsb.create-server
is used to set up the parameters necessary to manage the client services effectively.
You can use either the SOAP or XMLRPC protocol, or you can use a protocol of your own design, as long has that protocol uses an HTTP header to specify which action to perform. The type of protocol to be used is specified by the type
attribute. The value of the type parameter affects the service-name and type parameters meaning for the wsb.add-service
, wsb.remove-service
and wsb.service-exists
functions as follows:
You can specify a timeout value in milliseconds. The timeout value exists to ensure that an error on a connection does not tie up the server. The default value is 2500 milliseconds. A exception will be thrown if the specified time expires before an operation on the connection (read or write) completes.
If unique-dirs
is true, the WSB server will create a unique directory
for each service instance prior to the instance starting. Then, when the
instance later shuts down, the directory is deleted. This feature is
useful for situations where services need a work area on the filesystem
where they won't clash with other currently running services.
Setting unique-dirs
to true on create-server will affect all services
for that server. An alternative is to use the same parameter on
add-service or dispatch-request; that way this feature can be enabled
only for those services which require it (as there is a small
performance penalty during service startup).
By default, unique directories will be created in the system temporary
directory (often /tmp/ or C:\temp). However, if directory
is
specified, then the unique directories will be created in that directory
instead.
Copyright © Stilo International plc, 1988-2010.