RealSQLConnection

The RealSQLConnection class attempts to establish a connection to a Reality database given the supplied connection properties. Connection properties can come from three sources (in order of priority, lowest first):

  1. The realsql.properties file (in the same directory as the driver class files).

  2. The Property object in the getConnection(String,Properties) method. (See RealSQLDriver)

  3. The URL in any of the getConnection(URL ...) methods. (See RealSQLDriver)

  4. System properties. Set using the java -D command option when calling the application.)

If there are duplicate properties, then the priority order is taken into account.

As soon as the connection is established the driver and the server perform authorisation checks to ensure each is compatible with the other. If any of these checks fail the connection is closed and an exception thrown.

Any debug trace options for this connection are set, including host logging. See Diagnostics.

All communication for a connection is channelled through a separate RealServer class, which is created by the RealSQLConnection class during its initialisation. This class is responsible for marshalling all requests made to the server.

The createStatement() methods are used to create statement objects for sending SQL statements to the database. The default number of open statements on a single connection is 31, although this is configurable on the database.

Statement objects are automatically cleaned up if they have not been correctly closed by the client. Statements can only be created with a ResultSet type of FORWARD_ONLY and a concurrency of READ_ONLY.