skip to main content
Configuring Hybrid Data Pipeline for JDBC : Getting started with the JDBC driver : Connecting from an Application to Hybrid Data Pipeline : Connecting using the JDBC Driver Manager
  

Try Now
Connecting using the JDBC Driver Manager
To use the JDBC Driver manager:
*The driver JAR file must be defined in the application's CLASSPATH.
*Within your application, you need to pass in the connection URL.
Follow these steps to add the driver to a CLASSPATH, register it, and add the appropriate calls in your application:
1. Set your system CLASSPATH to include the driver jar file as shown, where install_dir is the path to your product installation directory:  
UNIX Example: CLASSPATH=.:/home/user1/ddhybridjdbc/lib/ddhybrid.jar 
2. Pass the connection URL in the application. The URL includes the user name and password for your Hybrid Data Pipeline connectivity service account and the name of the data source defined in the connectivity service. You must also pass in the credentials to the data store if they are not saved in the data source:
*This example assumes that the data source contains login credentials for the data store, the data source name is myDataSource, myusername and mypassword are the login credentials for the Hybrid Data Pipeline service:
Connection conn = DriverManager.getConnection(
"jdbc:datadirect:ddhybrid://myserver:8080;hybridDataPipelineDataSource=mydatasource",
user=myusername;password=mypassword;encryptionMethod=noEncryption;);
*This example assumes that login credentials are not stored in the data source definition, the data source name and connectivity service login credentials are the same as the previous example, and the data store user ID and password are test and secret:
Connection conn = DriverManager.getConnection(
"jdbc:datadirect:ddhybrid://myserver:8080;hybridDataPipelineDataSource=mydatasource;
datasourceUserId=test;datasourcePassword=secret;
encryptionMethod=noEncryption;user=myusername;password=mypassword");
Other connection properties specific to the type of data store are set in the data source definition. To modify those, log in to your Hybrid Data Pipeline account.