You can let IBM Informix JDBC Driver look up the host name or port number in an LDAP server instead of specifying them in a database URL or DataSource object directly. You must specify the following properties in the database URL or DataSource object for the LDAP server:
host-name and port-number are those of the LDAP server, not the database server.
If LDAP_USER and LDAP_PASSWD are not specified, IBM Informix JDBC Driver uses an anonymous search to search the LDAP server. The LDAP administrator must make sure that an anonymous search is allowed on the sqlhosts entry. For more information, see your LDAP server documentation.
Informix-base-DN has the following basic format:
cn=common-name,o=organization,c=country
If common-name, organization, or country consists of more than one word, you can use one entry for each word. For example:
cn=informix,cn=software
Here is an example database URL:
jdbc:informix-sqli:informixserver=value;SQLH_TYPE=LDAP; LDAP_URL=ldap://davinci:329;LDAP_IFXBASE=cn=informix, cn=software,o=kmart,c=US;LDAP_USER=abcd;LDAP_PASSWD=secret
You can also specify the sqlhosts file in the database URL or DataSource object. The host name and port number are read from the sqlhosts file. You must specify the following properties for the file:
The sqlhosts file can be local or remote, so you can refer to it in the local file system format or URL format. Here are some examples:
The host-name and port-number elements are those of the server on which the sqlhosts file resides.
Here is an example database URL:
jdbc:informix-sqli:informixserver=value;SQLH_TYPE=FILE; SQLH_FILE=/u/local/sqlhosts.ius
If the database URL or DataSource object references the LDAP server or sqlhosts file but also directly specifies the IP address, host name, and port number, then the IP address, host name, and port number specified in the database URL or DataSource object take precedence. For information about how to set these connection properties using a DataSource object, see Appendix B. DataSource Extensions.
If you are using an applet or the database is behind a firewall, an HTTP proxy servlet, running in an extra tier, is required for communication. See Using an HTTP Proxy Server for more information.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]