| title | Setting the data source properties |
|---|---|
| description | Learn about data sources in JDBC and how to set their properties to configure database access with Java. |
| author | David-Engel |
| ms.author | davidengel |
| ms.date | 08/12/2019 |
| ms.service | sql |
| ms.subservice | connectivity |
| ms.topic | concept-article |
[!INCLUDEDriver_JDBC_Download]
Data sources are the preferred mechanism by which to create JDBC connections in a Java Platform, Enterprise Edition (Java EE) environment. Data sources provide connections, pooled connections, and distributed connections without hard-coding connection properties into Java code. All [!INCLUDEjdbcNoVersion] data sources can set or get the value of any property by using the appropriate setter and getter methods, respectively.
Java EE products, such as application servers and servlet/JSP engines, typically let you configure data sources for database access. Any property listed in the Setting the Connection Properties topic can be specified wherever the configuration lets you enter a property as a property=value pair.
For more information about [!INCLUDEssNoVersion] data sources, see the SQLServerDataSource class. For an example of how to use the SQLServerDataSource class to make a connection to a [!INCLUDEssNoVersion] database, see Data source sample.