IDEMPIERE-862 Create lines from MPS Lines function is not working - fix deadlock problem

This commit is contained in:
Elaine Tan 2013-04-26 18:30:35 +08:00
parent 5ff38a68f3
commit a39d4cfed5
1 changed files with 8 additions and 6 deletions

View File

@ -319,7 +319,7 @@ public class MPackage extends X_M_Package
if (line.getM_PackageMPS_ID() == 0)
continue;
MPackageMPS packageMPS = new MPackageMPS(getCtx(), line.getM_PackageMPS_ID(), get_TrxName());
MPackageMPS packageMPS = new MPackageMPS(getCtx(), line.getM_PackageMPS_ID(), null);
packageMPS.setMasterTrackingNo(line.getMasterTrackingNo());
packageMPS.setTrackingNo(line.getTrackingNo());
packageMPS.setPrice(line.getPrice());
@ -369,11 +369,13 @@ public class MPackage extends X_M_Package
log.log(Level.SEVERE, "processOnline", e);
setErrorMessage(Msg.getMsg(Env.getCtx(), "ShippingNotProcessed") + ": " + e.getMessage());
}
if (trx != null)
finally
{
trx.commit();
trx.close();
if (trx != null)
{
trx.commit();
trx.close();
}
}
return ok;