Running multiple wire listeners
You can run multiple wire listeners.
About this task
Procedure
- Create the individual configuration files in the $INFORMIXDIR/etc directory. You can use the $INFORMIXDIR/etc/jsonListener-example.properties file as a template.
- Customize each configuration file and assign a unique name.
Important: The url parameter must be specified, either in each individual configuration file or in the file that is referenced by the include parameter.
- Specify the include parameter to reference an additional configuration file. The path can be relative or absolute. If you have multiple configuration files, you can avoid duplicating parameter settings in the multiple configuration files by specifying a subset of shared parameters in a single configuration file, and the unique parameters in the individual configuration files.
- Start the wire listeners.
Example: Running multiple wire listeners that share parameter settings
In this example, the same url, authentication.enable, and security.sql.passthrough parameters are used to run two wire listeners:- Create a configuration file named shared.properties that includes the
following
parameters:
url=jdbc:informix-sqli://localhost:9090/sysmaster: INFORMIXSERVER=ol_informix1210; authentication.enable=true security.sql.passthrough=true
- Create a configuration file for use with the MongoDB API
that is named mongo.properties, with the parameter include=shared.properties set:
include=shared.properties listener.type=mongo listener.port=27017
- Create a configuration file for use with the REST API that is
named rest.properties, with the parameter include=shared.properties set:
include=shared.properties listener.type=rest listener.port=8080
- From the command line, run the start command. Include separate
-config
arguments for each wire listener API type.java -jar $INFORMIXDIR/bin/jsonListener.jar -config json.properties -config rest.properties -start