ESP JDBC Driver Retrieval

SAP Sybase Event Stream Processor provides a thin wrapper over the postgresql driver class org.postgresql.Driver, which overrides the connection and disconnection mechanisms to connect to projects running in the ESP cluster.

To use the driver, first add the ESP SDK and PostgreSQL JDBC driver jar files (esp_sdk.jar and postgresql.jar) to the classpath, then register the driver with the Driver Manager as you normally would.

When you have successfully registered the driver, you can use it by retrieving a Connection instance from the driver manager by specifying the appropriate JDBC URL, which uses the following format:

jdbc:esp://cluster_host:cluster_port/workspace/project[?arg1=value1&.....]

You can specify parameters that are supported by this driver in one of two ways. You can pass them in the Properties object when retrieving the connection, or you can specify them in the URL in the standard query parameter format. In either case, the supported parameters and their allowed values are:

The following sample passes parameters in the URL in the standard query parameter format:

class.forName("com.mycompany.esp.jdbc.Driver" ); 
     String uri = "jdbc:esp://cluster_host:cluster_port/workspace/project?ssl=true"
     Connection conn = null; 
     conn = DriverManager.getConnection(uri); 
The following sample passes parameters in the properties object:
 Properties props = new Properties(); 
 props.out("ssl", "true");
 String uri = "jdbc:esp://cluster_host:cluster_port/workspace/project"
 Connection conn = null;
 conn = DriverManager.getConnection(uri, props);