java.sql.DriverManager.getConnection Method

A Java application using the JDBC API establishes a connection to a distributed system by obtaining a Connection object. The standard way to obtain a Connection object is to call the method DriverManager.getConnection, which takes a String containing a connection URL. A JDBC connection URL (uniform resource locator) identifies a source of data.

DriverManager.getConnection can take one argument besides a connection URL, a Properties object. You can use the Properties object to set connection URL attributes.

You can also supply strings representing user names and passwords. When they are supplied, SQLFire checks whether they are valid for the current system if user authentication is enabled. User names are passed to SQLFire as authorization identifiers, which determine whether the user is authorized for access to the database and determine the default schema. When the connection is established, if no user is supplied, SQLFire sets the default schema to APP. If a user is supplied, the default schema is the same as the user name.

SQLFire Connection URL Syntax

A SQLFire connection URL consists of the connection URL protocol (jdbc:) followed by the subprotocol (sqlfire:) and then optional attributes.

Syntax of Connection URLs for peer-clients

For applications that run in a peer-client, the syntax of the connection URL is

In JDBC terminology, sqlfire is the subprotocol for connecting to a GemFire distributed system. The subprotocol is always sqlfire and does not vary.
Specify 0 or more connection URL attributes as detailed in Configuration Properties.

Additional SQL Syntax

SQLFire also supports the following SQL standard syntax to obtain a reference to the current connection in a server-side JDBC routine: