In jConnect, you can use the Java Naming and Directory Interface (JNDI) to provide connection information, which offers:
A centralized location where you can specify host names and ports for connecting to a server. You do not need to hard code a specific host and port number in an application.
A centralized location where you can specify connection properties and a default database for all applications to use.
The jConnect CONNECTION_FAILOVER property for handling unsuccessful connection attempts. When CONNECTION_FAILOVER is set to "true," jConnect attempts to connect to a sequence of host/port server addresses in the JNDI name space until one succeeds.
To use jConnect with JNDI, you need to make sure that certain information is available in any directory service that JNDI accesses and that required information is set in the javax.naming.Context class. This section covers the following topics: