* Align startDBProcess with startProcess transaction semantic

This commit is contained in:
Heng Sin Low 2007-01-29 11:52:36 +00:00
parent 85ddbcd144
commit fab0a7c545
1 changed files with 10 additions and 0 deletions

View File

@ -599,10 +599,20 @@ public class ProcessCtl extends Thread
cstmt.setInt(1, m_pi.getAD_PInstance_ID());
cstmt.executeUpdate();
cstmt.close();
if (m_trx != null && m_trx.isActive())
{
m_trx.commit(true);
m_trx.close();
}
}
catch (Exception e)
{
log.log(Level.SEVERE, sql, e);
if (m_trx != null && m_trx.isActive())
{
m_trx.rollback();
m_trx.close();
}
m_pi.setSummary (Msg.getMsg(Env.getCtx(), "ProcessRunError") + " " + e.getLocalizedMessage());
m_pi.setError (true);
return false;