Connecting to an XDB Server

Once you have loaded the Direct Flight driver, you can connect to an XDB Server. You do this by passing information to one of the three overloads for the DriverManager.getConnection method. See the section Overloads for the DriverManager.getConnection Method for more information. The following table shows you where different types of information can be passed to the overloads:

Information Passed Where? Required?
The name of an XDB Server (or a list of XDB Servers for fault tolerance) Only in the URL Required
An AuthID and password recognized by the XDB Server As explicit parameters for Overload 1 or as properties:
  • In the URL
  • In a Properties Object
Required
Additional property values (including a data profile)
  • In the URL
  • In a Properties Object
Optional

See the sections Direct Flight URL Syntax, Direct Flight Data Connection Properties and Defining a JDBC Data Profile for more information.

There is an order of precedence for property value definitions. The order is:

  1. A URL overrides all other definitions
  2. A Property Object overrides values defined in a data profile
  3. A data profile does not override any other definitions
Note:

If you have defined a data profile and set its canoverride property to "No," the property values defined in the data profile are not overridden by values in the URL or Properties Object. See the section Defining a JDBC Data Profile for more information.