|  | 
 | ||||
|        | |||||
|  | ||||||
| Other Library Functions | ||||||
| function | wsb.add-service | 
| Library: Net, Web Services Broker (OMWSB) Import: omwsb.xmd | 
  export external function add-service
    to                        value server      server
    named                     value stream      service-name
    of-type                   value stream      type        optional
    handled-by                value stream      program
    min-threads               value integer     min         optional
    max-threads               value integer     max         optional
Argument definitions
The wsb.add-service function allows a new service to be added to an already initialized server OMX. This function can be used to initialize the service mapping prior to servicing any requests, as well as allowing services to be dynamically added at runtime. If a service with the same name and type is already in the table, an exception is thrown. Once a service is registered, all incoming requests that match both the service name and the service type are sent to an invocation of the compiled OmniMark program named by the program parameter.
wsb.add-service creates a thread pool with min-threads threads associated with that service. The actual number of running threads at a given time varies based on the current load on that service, but always ranges between min-threads and max-threads.
See the description of wsb.create-server for further details on the service-name and type parameters.