[ 
https://issues.apache.org/jira/browse/FLINK-19435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17203615#comment-17203615
 ] 

Jark Wu commented on FLINK-19435:
---------------------------------

You mean {{Class.forName()}} is not thread safe? 

> jdbc JDBCOutputFormat open function invoke Class.forName(drivername)
> --------------------------------------------------------------------
>
>                 Key: FLINK-19435
>                 URL: https://issues.apache.org/jira/browse/FLINK-19435
>             Project: Flink
>          Issue Type: Improvement
>          Components: Connectors / JDBC
>    Affects Versions: 1.10.2
>            Reporter: xiaodao
>            Priority: Major
>             Fix For: 1.10.3
>
>
> when we sink data to multi jdbc outputformat , 
> ```
> protected void establishConnection() throws SQLException, 
> ClassNotFoundException {
>  Class.forName(drivername);
>  if (username == null) {
>  connection = DriverManager.getConnection(dbURL);
>  } else {
>  connection = DriverManager.getConnection(dbURL, username, password);
>  }
> }
> ```
> may cause jdbc driver deadlock. it need to change to synchronized function.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to