details: https://code.openbravo.com/erp/devel/pi/rev/6bf3013c651b changeset: 32153:6bf3013c651b user: Atul Gaware <atul.gaware <at> openbravo.com> date: Tue May 23 22:35:39 2017 +0530 summary: Fixes issue 34512: Close year process is locked just at JVM level
Removed synchronized keyword in processYearClose, processButtonReg and processButtonClose methods to allow execution of process in parallel by different threads in same JVM. details: https://code.openbravo.com/erp/devel/pi/rev/e96d2416282f changeset: 32154:e96d2416282f user: Atul Gaware <atul.gaware <at> openbravo.com> date: Wed May 24 13:25:52 2017 +0530 summary: Fixes issue 34513: CreateRegFactAcct is locked just at JVM level Removed synchronized keyword in processButton, processButtonReg and processButtonClose methods to allow execution of process in parallel by different threads in same JVM. diffstat: src/org/openbravo/erpCommon/ad_actionButton/CreateRegFactAcct.java | 16 +++++----- src/org/openbravo/erpCommon/businessUtility/EndYearCloseUtility.java | 11 +++--- 2 files changed, 13 insertions(+), 14 deletions(-) diffs (89 lines): diff -r bad50b303382 -r e96d2416282f src/org/openbravo/erpCommon/ad_actionButton/CreateRegFactAcct.java --- a/src/org/openbravo/erpCommon/ad_actionButton/CreateRegFactAcct.java Tue May 23 12:28:01 2017 +0530 +++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateRegFactAcct.java Wed May 24 13:25:52 2017 +0530 @@ -11,7 +11,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2001-2012 Openbravo SLU + * All portions are Copyright (C) 2001-2017 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ @@ -84,8 +84,8 @@ pageErrorPopUp(response); } - private synchronized OBError processButton(VariablesSecureApp vars, String strKey, - String strOrgId, String windowId) { + private OBError processButton(VariablesSecureApp vars, String strKey, String strOrgId, + String windowId) { Connection conn = null; OBError myError = new OBError(); @@ -199,9 +199,9 @@ return myError; } - private synchronized String processButtonReg(Connection conn, VariablesSecureApp vars, - String strKey, String windowId, String stradOrgId, String strID, String strAcctSchema, - String strDivideUpId, CreateRegFactAcctData[] account2) throws ServletException { + private String processButtonReg(Connection conn, VariablesSecureApp vars, String strKey, + String windowId, String stradOrgId, String strID, String strAcctSchema, String strDivideUpId, + CreateRegFactAcctData[] account2) throws ServletException { String Fact_Acct_ID = ""; String Fact_Acct_Group_ID = strID; String strPediodId = CreateRegFactAcctData.getLastPeriod(this, strKey); @@ -323,8 +323,8 @@ return "Success"; } - private synchronized String processButtonClose(Connection conn, VariablesSecureApp vars, - String strKey, String windowId, String stradOrgId, String strCloseID, String strOpenID, + private String processButtonClose(Connection conn, VariablesSecureApp vars, String strKey, + String windowId, String stradOrgId, String strCloseID, String strOpenID, String strAcctSchema, String strDivideUpId) throws ServletException { String Fact_Acct_Group_ID = strCloseID; String strPediodId = CreateRegFactAcctData.getLastPeriod(this, strKey); diff -r bad50b303382 -r e96d2416282f src/org/openbravo/erpCommon/businessUtility/EndYearCloseUtility.java --- a/src/org/openbravo/erpCommon/businessUtility/EndYearCloseUtility.java Tue May 23 12:28:01 2017 +0530 +++ b/src/org/openbravo/erpCommon/businessUtility/EndYearCloseUtility.java Wed May 24 13:25:52 2017 +0530 @@ -11,7 +11,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2013-2016 Openbravo SLU + * All portions are Copyright (C) 2013-2017 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ @@ -63,7 +63,7 @@ con = _con; } - public synchronized OBError processYearClose() { + public OBError processYearClose() { String strYearId = year.getId(); String strOrgId = organization.getId(); OBError myError = new OBError(); @@ -174,7 +174,7 @@ return myError; } - private synchronized String processButtonReg(String strYearId, String stradOrgId, + private String processButtonReg(String strYearId, String stradOrgId, String strFact_Acct_Group_ID, String strAcctSchema, String strDivideUpId, EndYearCloseUtilityData[] account2) throws ServletException { String Fact_Acct_ID = ""; @@ -298,9 +298,8 @@ return "Success"; } - private synchronized String processButtonClose(String strYearId, String stradOrgId, - String strCloseID, String strOpenID, String strAcctSchema, String strDivideUpId) - throws ServletException { + private String processButtonClose(String strYearId, String stradOrgId, String strCloseID, + String strOpenID, String strAcctSchema, String strDivideUpId) throws ServletException { String Fact_Acct_Group_ID = strCloseID; String strPediodId = EndYearCloseUtilityData.getLastPeriod(conn, strYearId); String newPeriod = EndYearCloseUtilityData.getNextPeriod(conn, strPediodId); ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits