This is an automated email from the ASF dual-hosted git repository.

roman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit ace1ce7119a7e5fb7b69a46b86c3249febd3bf46
Author: Roman Khachatryan <[email protected]>
AuthorDate: Thu Aug 19 21:17:56 2021 +0100

    [FLINK-23876][docs] Add JDBC XA DataSource examples
---
 docs/content/docs/connectors/datastream/jdbc.md | 28 ++++++++++++++++++++++---
 1 file changed, 25 insertions(+), 3 deletions(-)

diff --git a/docs/content/docs/connectors/datastream/jdbc.md 
b/docs/content/docs/connectors/datastream/jdbc.md
index 171cdc6..db0a784 100644
--- a/docs/content/docs/connectors/datastream/jdbc.md
+++ b/docs/content/docs/connectors/datastream/jdbc.md
@@ -182,9 +182,31 @@ env.execute();
 ```
 Postgres XADataSource Example:
 ```java
-PGXADataSource pgxaDataSource = new PGXADataSource();
-pgxaDataSource.setUrl(
-"jdbc:postgresql://localhost:5432/postgres");
+
+### `XADataSource` examples
+PostgreSQL `XADataSource` example:
+```java
+PGXADataSource xaDataSource = new org.postgresql.xa.PGXADataSource();
+xaDataSource.setUrl("jdbc:postgresql://localhost:5432/postgres");
+xaDataSource.setUser(username);
+xaDataSource.setPassword(password);
+```
+
+MySQL `XADataSource` example:
+```java
+MysqlXADataSource xaDataSource = new com.mysql.cj.jdbc.MysqlXADataSource();
+xaDataSource.setUrl("jdbc:mysql://localhost:3306/");
+xaDataSource.setUser(username);
+xaDataSource.setPassword(password);
+```
+
+Oracle `XADataSource` example:
+```java
+OracleXADataSource xaDataSource = new oracle.jdbc.xa.OracleXADataSource();
+xaDataSource.setURL("jdbc:oracle:oci8:@");
+xaDataSource.setUser("scott");
+xaDataSource.setPassword("tiger");
 ```
+Please also take Oracle connection pooling into account.
 
 Please refer to the `JdbcXaSinkFunction` documentation for more details.

Reply via email to