iemejia commented on a change in pull request #12209: URL: https://github.com/apache/beam/pull/12209#discussion_r452940734
########## File path: sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java ########## @@ -147,10 +147,10 @@ * ); * }</pre> * - * By default, the provided function instantiates a DataSource per execution thread. In some - * circumstances, such as DataSources that have a pool of connections, this can quickly overwhelm - * the database by requesting too many connections. In that case you should make the DataSource a - * static singleton so it gets instantiated only once per JVM. + * <p>By default, the provided function requests a DataSource per execution thread. In some + * circumstances this can quickly overwhelm the database by requesting too many connections. In that + * case you should look into sharing a single instance of a {@link PoolingDataSource} across all the + * execution threads. Review comment: Since this is a recurrent issue for users I am wondering if It would probably be good to add a snippet of how to achieve this (maybe in a subsequent PR since it is not exactly related). ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org