details: https://code.openbravo.com/erp/devel/pi/rev/ed6475ed00d3 changeset: 32149:ed6475ed00d3 user: Asier Lostalé <asier.lostale <at> openbravo.com> date: Mon May 22 10:47:17 2017 +0200 summary: fixed bug 36001: leaked db connection after start the system having Analytics
A DB transaction is kept open in 'idle in transaction' state forever afeter Tomcat start in case there are any servlet that is loaded on startup. details: https://code.openbravo.com/erp/devel/pi/rev/fcdc5e67ecce changeset: 32150:fcdc5e67ecce user: Asier Lostalé <asier.lostale <at> openbravo.com> date: Mon May 22 10:53:27 2017 +0200 summary: related to bug 36001: HSAS.init log cleanup * Removed unneeded log for host info * Rephrased mehtod invokation message * Add context in case of error * Show stack traces in case of error diffstat: src/org/openbravo/base/secureApp/HttpSecureAppServlet.java | 17 +++++-------- 1 files changed, 7 insertions(+), 10 deletions(-) diffs (42 lines): diff -r cdb4ed6b52d2 -r fcdc5e67ecce src/org/openbravo/base/secureApp/HttpSecureAppServlet.java --- a/src/org/openbravo/base/secureApp/HttpSecureAppServlet.java Tue Apr 25 09:39:15 2017 -0400 +++ b/src/org/openbravo/base/secureApp/HttpSecureAppServlet.java Mon May 22 10:53:27 2017 +0200 @@ -123,31 +123,28 @@ super.init(config); m_AuthManager = AuthenticationManager.getAuthenticationManager(this); - log4j.debug("strdireccion: " + strDireccion); - // Calculate class info try { - - log4j.debug("Servlet request for class info: " + this.getClass()); + log4j.debug("Initializing Servlet " + this.getClass()); if (classInfo == null) { - ClassInfoData[] classInfoAux = ClassInfoData.select(new DalConnectionProvider(false), this - .getClass().getName()); - if (classInfoAux != null && classInfoAux.length > 0) + // do not use DAL at this point: it's not guaranteed to be executed within a Servlet request + ClassInfoData[] classInfoAux = ClassInfoData.select(this, this.getClass().getName()); + if (classInfoAux != null && classInfoAux.length > 0) { classInfo = classInfoAux[0]; - else { + } else { classInfoAux = ClassInfoData.set(); classInfo = classInfoAux[0]; } } } catch (final Exception ex) { - log4j.error(ex); + log4j.error("Error initializing Servlet " + this.getClass(), ex); ClassInfoData[] classInfoAux; try { classInfoAux = ClassInfoData.set(); classInfo = classInfoAux[0]; } catch (ServletException e) { - log4j.error(e); + log4j.error("Error initializing Servlet " + this.getClass(), ex); } } } ------------------------------------------------------------------------------ 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