The main differences compared to a server startup are:
- The servlet overrides the init method of the superclass.
This method is called by the Web server to start the servlet. Typically this
occurs when the first request for the servlet arrives.
- The name of the startup ini file cannot be passed
in from the command line. The example expects to obtain the name using the
servlet method getInitParameter() which takes the name
of a parameter and returns a value. The MQe servlet uses
a Startup parameter that it expects
to contain an ini file name. The mechanism for configuring
parameters in a Web server is Web server dependant.
- A listener is not started as the Web server handles all network requests
on behalf of the servlet.
- As there is no listener a mechanism is required to time-out connections
that have been inactive for longer than the time-out period. A simple timer
class MQeChannelTimer is instantiated to perform this
function. The TimeInterval value
is the only parameter used from the [Listener] section of
the ini file.