Skip to content

The logic regarding transaction rollback seems incorrect #837

Open
@xutengx

Description

@xutengx

src/main/java/org/mybatis/spring/transaction/SpringManagedTransaction.java

/**
   * {@inheritDoc}
   */
  @Override
  public void rollback() throws SQLException {
    if (this.connection != null && !this.isConnectionTransactional && !this.autoCommit) {
      LOGGER.debug(() -> "Rolling back JDBC Connection [" + this.connection + "]");
      this.connection.rollback();
    }
  }
this.connection != null && !this.isConnectionTransactional && !this.autoCommit

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions