skip to main content
Getting started : Connecting from an application : Connecting using JDBC Data Sources
 

Try DataDirect Cloud Now

Connecting using JDBC Data Sources

A JDBC data source is a Java object, specifically a DataSource object, that defines connection information required for a JDBC driver to connect to the database. Each JDBC driver vendor provides their own data source implementation for this purpose. Progress DataDirect provides a DataSource object for storing the connection information needed for the DataDirect Cloud for JDBC to connect to a DataDirect Cloud Data Source, which in turn provides access to a cloud data store.
JDBC data sources work with the Java Naming Directory Interface (JNDI) naming service, providing an extra level of abstraction that allows you to create and manage JDBC data sources (in this case, a DataDirect Cloud connectivity service Data Source) separately from the applications that use them. The connection information is defined outside of the application, minimizing the effort to reconfigure applications when data source parameters change. The applications only refer to the name of the JDBC data source and therefore, do not need to change.
The DataDirect Cloud Driver for JDBC data source class implements the following JDBC interfaces:
*javax.sql.DataSource.
*javax.sql.ConnectionPoolDataSource allows applications to use connection pooling.
To create your own JDBC Data Source implementation, consider the following requirements:
*If you plan to connect using a JNDI File System Service Provider, the fscontext.jar and providerutil.jar files that are shipped with the JNDI File System Service Provider, must be on your classpath. To download the JNDI File System Service Provider, go to the following Web site and select a JNDI version:
http://www.oracle.com/technetwork/java/javasebusiness/downloads/​java-archive-downloads-java-plat-419418.html#7110-jndi-1.2.1-oth-JPR
* Calling a JDBC Data Source in an application