IP address in connection URLs
The HCL Informix® JDBC Driver, Version 3.0 and later is IPv6 aware.
That is, the code that parses the connection URL can handle
the longer (128-bit mode) IPv6 addresses (as well as IPv4 format).
This IP address can be a IPv6 literal, for example:
3ffe:ffff:ffff:ffff:0:0:0:12
To connect to the IPv6 port with the Informix server, use the system property, for example:
java -Djava.net.preferIPv6Addresses=true ...
With the HCL Informix JDBC Driver, Version 3.0, or later handling of URLs without IPv6 literals is unchanged, and legacy behavior is unchanged.
The colon (:) is a key delimiter in a connection URL, especially in IPv6 literal addresses.
You
must create a well-formed URL for the driver to recognize an IPv6
literal address. Note, in the following example:
- The jdbc:informix-sqli:// is required.
- The colons surrounding the 8088, (:8088:) are required.
- The 3ffe:ffff:ffff:ffff:0::12 is not validated by the driver.
- The 8088 must be a valid number < 32k.
jdbc:informix-sqli://3ffe:ffff:ffff:ffff:0::12:8088:informixserver=X...