Skip to content

Commit 9790a44

Browse files
Tweaked wording in docs/using-the-jdbc-wrapper/DataSource.md to update tense to active voice, first person (#37)
1 parent 7a9857f commit 9790a44

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

docs/using-the-jdbc-wrapper/DataSource.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
11
# Connecting with a DataSource
2-
In addition to the `DriverManager` class, one can also use a datasource to establish new connections.
3-
The JDBC Wrapper has a built-in datasource class called [AwsWrapperDataSource](../../wrapper/src/main/java/com/amazon/awslabs/jdbc/ds/AwsWrapperDataSource.java).
4-
The `AwsWrapperDataSource` enables the JDBC Wrapper to work with various driver-specific datasources.
2+
You can use the `DriverManager` class or a datasource to establish a new connection when using the JDBC Wrapper. The JDBC Wrapper has a built-in datasource class named [AwsWrapperDataSource](../../wrapper/src/main/java/com/amazon/awslabs/jdbc/ds/AwsWrapperDataSource.java) that allows the JDBC Wrapper to work with various driver-specific datasources.
53

64
## Using the AwsWrapperDataSource
75

8-
There are 3 tasks to establish a connection with the AwsWrapperDataSource:
6+
To establish a connection with the AwsWrapperDataSource, you must:
97

108
1. Configure the property names for the underlying driver-specific datasource.
11-
2. Target driver-specific datasource.
9+
2. Target a driver-specific datasource.
1210
3. Configure the driver-specific datasource.
1311

1412
### Configurable DataSource Properties
1513

1614
To allow the AWS Advanced JDBC Wrapper to work with multiple driver-specific datasources,
17-
it is necessary for the user to specify what property names the underlying datasource uses.
15+
you need to specify what property names the underlying datasource uses.
1816
For example, one datasource implementation could use the method `setUser` to set the datasource username,
19-
and another could use the method `setUsername` to do the same.
20-
See the table below for a list of configurable property names.
17+
while another might use the method `setUsername` for the same task. See the table below for a list of configurable property names.
2118

2219
> **:warning: Note:** If the same connection property is provided both explicitly in the connection URL and in the datasource properties, the value set in the connection URL will take precedence.
2320
@@ -35,17 +32,18 @@ See the table below for a list of configurable property names.
3532

3633
## Using the AwsWrapperDataSource with Connection Pooling Frameworks
3734

38-
The JDBC Wrapper also supports establishing connection with a connection pooling framework.
35+
The JDBC Wrapper also supports establishing a connection with a connection pooling framework.
3936

40-
There are 4 tasks to use the JDBC Wrapper with a connection pool:
37+
To use the JDBC Wrapper with a connection pool, you must:
4138

4239
1. Configure the connection pool.
4340
2. Set the datasource class name to `com.amazon.awslabs.jdbc.ds.AwsWrapperDataSource` for the connection pool.
4441
3. Configure the `AwsWrapperDataSource`.
4542
4. Configure the driver-specific datasource.
4643

47-
### HikariCP
48-
[HikariCP](https://github.com/brettwooldridge/HikariCP) is a popular connection pool, below are the steps to a simple connection pool with HikariCP and PostgreSQL:
44+
### HikariCP Pooling Example
45+
46+
[HikariCP](https://github.com/brettwooldridge/HikariCP) is a popular connection pool; the steps that follow configure a simple connection pool with HikariCP and PostgreSQL:
4947

5048
1. Configure the HikariCP datasource:
5149
```java
@@ -87,4 +85,4 @@ There are 4 tasks to use the JDBC Wrapper with a connection pool:
8785

8886
See [here](./sample-code/HikariSample.java) for a complete sample.
8987

90-
> **:warning:Note:** HikariCP supports either DataSource-based configuration or DriverManager-based configuration by specifying the `dataSourceClassName` or the `jdbcUrl`. When using the `AwsWrapperDataSource` one must specify the `dataSourceClassName`, therefore `HikariDataSource.setJdbcUrl` is not supported. For more information see HikariCP's [documentation](https://github.com/brettwooldridge/HikariCP#gear-configuration-knobs-baby).
88+
> **:warning:Note:** HikariCP supports either DataSource-based configuration or DriverManager-based configuration by specifying the `dataSourceClassName` or the `jdbcUrl`. When using the `AwsWrapperDataSource` you must specify the `dataSourceClassName`, therefore `HikariDataSource.setJdbcUrl` is not supported. For more information see HikariCP's [documentation](https://github.com/brettwooldridge/HikariCP#gear-configuration-knobs-baby).

0 commit comments

Comments
 (0)