IDEMPIERE-3350 Accounting Processor GL postings to "secondary" schema unreliable. Commit and rollback posting to all schema as one transaction.
This commit is contained in:
parent
bf13e34476
commit
6770328dbf
|
@ -19,7 +19,6 @@ package org.compiere.acct;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.sql.Savepoint;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -295,23 +294,17 @@ public class DocManager {
|
||||||
Doc doc = Doc.get (as, AD_Table_ID, rs, trxName);
|
Doc doc = Doc.get (as, AD_Table_ID, rs, trxName);
|
||||||
if (doc != null)
|
if (doc != null)
|
||||||
{
|
{
|
||||||
Savepoint savepoint = trx.setSavepoint(null);
|
|
||||||
error = doc.post (force, repost); // repost
|
error = doc.post (force, repost); // repost
|
||||||
status = doc.getPostStatus();
|
status = doc.getPostStatus();
|
||||||
if (error != null && error.trim().length() > 0)
|
if (error != null && error.trim().length() > 0)
|
||||||
{
|
{
|
||||||
trx.rollback(savepoint);
|
trx.rollback();
|
||||||
break;
|
return error;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
trx.releaseSavepoint(savepoint);
|
|
||||||
} catch (Exception e) {}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
trx.rollback();
|
||||||
return "NoDoc";
|
return "NoDoc";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue