activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (AMQ-5318) JDBC store; commit called on connection that uses autocommit during "deleteAllMessages" .
Date Sat, 09 Aug 2014 16:38:11 GMT


ASF GitHub Bot commented on AMQ-5318:

GitHub user pgfox opened a pull request:

    AMQ-5318: JDBC store; commit called on connection that uses autocommit during "deleteAllMessages"

    issue reported at AMQ-5318

You can merge this pull request into a Git repository by running:

    $ git pull jdbcAutoCommitCheck

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #43
commit 5a52536e409eae5dfae69ddb03e2dfa31112f90c
Author: pgf <>
Date:   2014-08-09T14:27:40Z

    added a check for autocommit before calling commit when dropping and creating tables +
test case.


> JDBC store; commit called on connection that uses autocommit during "deleteAllMessages"
> -----------------------------------------------------------------------------------------
>                 Key: AMQ-5318
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.10.0
>            Reporter: Pat Fox
>            Priority: Minor
> The oracle v12 driver throws the following exception if commit() is called on a connection
that has auto-commit enabled(see [1]) . This seems to be a change in behaviour since v11.
> {code}
> caused by: java.sql.SQLException: Could not commit with auto-commit set on
> 	at oracle.jdbc.driver.PhysicalConnection.commit(
> 	at oracle.jdbc.driver.PhysicalConnection.commit(
> 	at org.apache.commons.dbcp.DelegatingConnection.commit(
> 	at org.apache.commons.dbcp.DelegatingConnection.commit(
> 	at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.commit(
> 	at
> 	at
> 	... 40 more
> {code}
> In the it explicitly
calls connection.commit() without checking if auto-commit is enabled.  In other places auto-commit
does seem to be checked before commit is called  -
> The v12 driver does allow  autocommit-SpecCompliance to be turned off by setting system
property "oracle.jdbc.autoCommitSpecCompliant=false". But it does seem like
is not strictly adhering to the spec. 
> I think it would be better to do a check if auto-commit is on before calling connection.commit().

> I will attach a github pull request with test and potential fix - for someone to review.

This message was sent by Atlassian JIRA

View raw message