BF [ 1887674 ] Deadlock when try to modify PA Goal's Measure Target

This commit is contained in:
teo_sarca 2008-02-06 08:19:21 +00:00
parent 71bd400ba9
commit 4e1a51836b
2 changed files with 12 additions and 5 deletions

View File

@ -29,6 +29,9 @@ import org.compiere.util.*;
* *
* @author Jorg Janke * @author Jorg Janke
* @version $Id: MGoal.java,v 1.2 2006/07/30 00:51:03 jjanke Exp $ * @version $Id: MGoal.java,v 1.2 2006/07/30 00:51:03 jjanke Exp $
*
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
* <li>BF [ 1887674 ] Deadlock when try to modify PA Goal's Measure Target
*/ */
public class MGoal extends X_PA_Goal public class MGoal extends X_PA_Goal
{ {
@ -375,6 +378,7 @@ public class MGoal extends X_PA_Goal
|| getDateLastRun() == null || getDateLastRun() == null
|| !TimeUtil.isSameHour(getDateLastRun(), null)) || !TimeUtil.isSameHour(getDateLastRun(), null))
{ {
measure.set_TrxName(get_TrxName());
if (measure.updateGoals()) // saves if (measure.updateGoals()) // saves
{ {
load(get_ID(), get_TrxName()); load(get_ID(), get_TrxName());

View File

@ -28,6 +28,9 @@ import org.compiere.util.*;
* *
* @author Jorg Janke * @author Jorg Janke
* @version $Id: MMeasure.java,v 1.2 2006/07/30 00:51:05 jjanke Exp $ * @version $Id: MMeasure.java,v 1.2 2006/07/30 00:51:05 jjanke Exp $
*
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
* <li>BF [ 1887674 ] Deadlock when try to modify PA Goal's Measure Target
*/ */
public class MMeasure extends X_PA_Measure public class MMeasure extends X_PA_Measure
{ {
@ -185,7 +188,7 @@ public class MMeasure extends X_PA_Measure
{ {
MGoal goal = goals[i]; MGoal goal = goals[i];
goal.setMeasureActual(getManualActual()); goal.setMeasureActual(getManualActual());
goal.save(); goal.save(get_TrxName());
} }
return true; return true;
} // updateManualGoals } // updateManualGoals
@ -228,7 +231,7 @@ public class MMeasure extends X_PA_Measure
} }
} }
goal.setMeasureActual(ManualActual); goal.setMeasureActual(ManualActual);
goal.save(); goal.save(get_TrxName());
} }
return true; return true;
} // updateAchievementGoals } // updateAchievementGoals
@ -275,7 +278,7 @@ public class MMeasure extends X_PA_Measure
log.fine("No Value = " + sql); log.fine("No Value = " + sql);
} }
goal.setMeasureActual(ManualActual); goal.setMeasureActual(ManualActual);
goal.save(); goal.save(get_TrxName());
} }
return true; return true;
} // updateCalculatedGoals } // updateCalculatedGoals
@ -329,7 +332,7 @@ public class MMeasure extends X_PA_Measure
log.fine("No Value = " + sql); log.fine("No Value = " + sql);
} }
goal.setMeasureActual(ManualActual); goal.setMeasureActual(ManualActual);
goal.save(); goal.save(get_TrxName());
} }
return true; return true;
} // updateRequests } // updateRequests
@ -372,7 +375,7 @@ public class MMeasure extends X_PA_Measure
log.fine("No Value = " + sql); log.fine("No Value = " + sql);
} }
goal.setMeasureActual(ManualActual); goal.setMeasureActual(ManualActual);
goal.save(); goal.save(get_TrxName());
} }
return true; return true;
} // updateProjects } // updateProjects