You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2022/02/04 09:33:00 UTC
[jira] [Updated] (CAMEL-17599) JdbcProducer leaks PreparedStatement
[ https://issues.apache.org/jira/browse/CAMEL-17599?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-17599:
--------------------------------
Fix Version/s: 3.14.2
3.16.0
> JdbcProducer leaks PreparedStatement
> ------------------------------------
>
> Key: CAMEL-17599
> URL: https://issues.apache.org/jira/browse/CAMEL-17599
> Project: Camel
> Issue Type: Bug
> Components: camel-jdbc
> Affects Versions: 3.14.1, 3.15.0
> Reporter: James Netherton
> Priority: Major
> Fix For: 3.14.2, 3.16.0
>
>
> Originally reported on the a Quarkus Zulip thread:
> https://quarkusio.zulipchat.com/#narrow/stream/187030-users/topic/Camel.20JDBC.20leaks.20statement
> There are 2 different execution paths in JdbcProducer. doCreateAndExecuteSqlStatementWithHeaders & doCreateAndExecuteSqlStatement.
> doCreateAndExecuteSqlStatementWithHeaders does close the PreparedStatement:
> https://github.com/apache/camel/blob/camel-3.14.1/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcProducer.java#L185-L188
> doCreateAndExecuteSqlStatement does not:
> https://github.com/apache/camel/blob/camel-3.14.1/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcProducer.java#L244-L246
> This PR & commit suggests auto-closing is perhaps not desirable:
> https://github.com/apache/camel/pull/6192
> The code prior to Camel 3.12.x did close the PreparedStatement in the finally block, so maybe that should be restored.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)