|JDBC API / Core JDBC Classes, Interfaces, and Methods|
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, GemFire XD checks whether they are valid for the current system if user authentication is enabled. User names are passed to GemFire XD 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, GemFire XD sets the default schema to APP. If a user is supplied, the default schema is the same as the user name.
A GemFire XD connection URL consists of the connection URL protocol (jdbc:) followed by the subprotocol (gemfirexd:) and then optional attributes.
For applications that run in a peer-client, the syntax of the connection URL is
GemFire XD also supports the following SQL standard syntax to obtain a reference to the current connection in a server-side JDBC routine: