4.2.1 Additional Connection Properties

Table of Contents Previous Next



In addition to the standard connection parameters, the Advanced Server JDBC driver supports connection properties that control behavior specific to EnterpriseDB. You can specify these properties in the connection URL or as a Properties object parameter passed to DriverManager.getConnection(). Listing 1.2 demonstrates how to use a Properties object to specify additional connection properties:
The value of loglevel determines the amount of detail printed to the DriverManager’s current value for LogStream or LogWriter. It currently supports values of:
Set the value of loglevel to INFO to include sparse log information or to DEBUG to produce significant detail.
The value of charSet determines the character set used for data sent to or received from the database.
The value of prepareThreshold determines the number of PreparedStatement executions required before switching to server side prepared statements. The default is five.
Allows opening connections to only servers with the required state. The allowed values are any, master, secondary, preferSecondary, and preferSyncSecondary. The master/secondary distinction is currently done by observing if the server allows writes. The value preferSecondary tries to connect to secondaries if any are available, otherwise allows connecting to the master. The Advanced Server JDBC Connector supports preferSyncSecondary, which permits connection to only synchronous secondaries or the master if there are no active synchronous secondaries. See Section 0 for information on preferSyncSecondary. Note: The values slave, preferSlave, and preferSyncSlave have been deprecated as they have been replaced by the “secondary” values. The “slave” values are currently still supported, and the use of the terms “slave” and “secondary” provide the same functionality, however, it is advised to use the “secondary” values.
When set to true, column names from the RETURNING clause are not quoted. This eliminates a case-sensitive comparison of the column name. When set to false (the default setting), column names are quoted.


Table of Contents Previous Next