Starting the HCL OneDB Wire Listener for
MongoDB
About this task
Starting the OneDB Wire Listener for MongoDB
The HCL OneDB™ Mongo interface is part of
the HCL OneDB wire listener. The HCL OneDB wire listener comes with the
HCL
OneDB APIs
package.
Table 1. Prerequisites for starting the OneDB Wire Listener:
Java 1.8 |
A OneDB server that is up and running |
To start the OneDB Wire Listener for MongoDB:
Procedure
-
Create a listener properties file
Sample properties file:
url=jdbc:onedb://localhost:9088/sysmaster;USER=informix;PASSWORD=password
listener.hostName=*
listener.port=27017
listener.type=mongo
mongo.api.version=3.6
security.sql.passthrough=true
The wire
listener configuration file property is the JDBC url to connect
to your OneDB database server. The listener.hostName
property determines the network adapter or interface that the wire listener
binds the server socket to (a value of * directs the wire listener to bind
to all interfaces or addresses). The listener.port
property specifies the port number to listen on for incoming connections
from clients.
The mongo.api.version sets your MongoDB API compatibility level. The default MongoDB
compatibility level is version 3.6, but any of the following versions are
supported: 3.0, 3.2, 3.4, 3.6, 4.0, and 4.2.
Thesecurity.sql.passthrough is
optional, but by setting it to true, you enable support for issuing SQL
statements directly through the wire listener.
There are also authentication
options that can be specified in the properties file, which you
will want to configure once you get beyond the testing stage. See User authentication with the wire
listener for more details on authentication options.
-
Start the listener using java.
java -jar onedb-wire-listener.jar -config mongo.properties -logfile wire_listener_mongo.log -start
Have feedback?
Google Analytics is used to store comments and ratings. To provide a comment or rating for a topic, click Accept All Cookies or Allow All in Cookie Preferences in the footer of this page.