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