IDEMPIERE-5262 Implement readonly protection for DB.getSQLValueEx call (#1323)

- Avoid unnecessary commit call.
This commit is contained in:
hengsin 2022-05-12 00:03:03 +08:00 committed by GitHub
parent 9bc016dc3d
commit 4488537565
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -483,8 +483,11 @@ public class Trx
if (m_connection == null) if (m_connection == null)
return true; return true;
if (isActive()) try {
if (isActive() && !m_connection.isReadOnly())
commit(); commit();
} catch (SQLException e) {
}
// Close Connection // Close Connection
try try