throw ex; } finally { this.srvDatabase.releaseResources();
throw ex; } finally { this.srvDatabase.releaseResources();
throw ex; } finally { srvDatabase.releaseResources();
throw ex; } finally { srvDatabase.releaseResources();
throw ex; } finally { srvDatabase.releaseResources();
throw ex; } finally { this.srvDatabase.releaseResources();
throw ex; } finally { this.srvDatabase.releaseResources();
throw ex; } finally { this.srvDatabase.releaseResources(); if (recordSet != null) { recordSet.close();
throw ex; } finally { this.srvDatabase.releaseResources();
this.srvDatabase.releaseResources(); //close connection tryUgradeDatabaseAnyWay(dirPath + useSubFolder + "/"); } finally { this.srvDatabase.releaseResources(); //close connection this.srvDatabase.releaseResources(); //close connection
throw ex; } finally { this.srvDatabase.releaseResources(); if (recordSet != null) { recordSet.close();
/** * <p> * Read entities from stream (by given reader) and insert them * into DB with no changes. DB must be emptied before coping. * </p> * @param pAddParam additional params * @param pReader Reader * @throws Exception - an exception **/ @Override public final void readAndStoreEntities(final Map<String, Object> pAddParam, final Reader pReader) throws Exception { try { this.srvDatabase.setIsAutocommit(false); this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); while (this.utilXml.readUntilStart(pReader, "entity")) { Object entity = this.srvEntityReader.read(pAddParam, pReader); this.srvOrm.insertEntity(pAddParam, entity); } this.srvDatabase.commitTransaction(); } catch (Exception ex) { this.srvDatabase.rollBackTransaction(); throw ex; } finally { this.srvDatabase.releaseResources(); } }
/** * <p>Handle request.</p> * @param pReqVars Request scoped variables * @param pRequestData Request Data * @throws Exception - an exception */ @Override public final void handle(final Map<String, Object> pReqVars, final IRequestData pRequestData) throws Exception { try { this.srvDatabase.setIsAutocommit(false); this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); DatabaseInfo databaseInfo = getSrvOrm() .retrieveEntityWithConditions(pReqVars, DatabaseInfo.class, ""); pRequestData.setAttribute("databaseInfo", databaseInfo); pRequestData.setAttribute("appVersion", getSrvOrm().getMngSettings() .getAppSettings().get("appVersion")); this.srvDatabase.commitTransaction(); } catch (Exception ex) { this.srvDatabase.rollBackTransaction(); throw ex; } finally { this.srvDatabase.releaseResources(); } }
throw ex; } finally { this.srvDatabase.releaseResources(); if (recordSet != null) { recordSet.close();
/** * <p>Handle request.</p> * @param pReqVars Request scoped variables * @param pRequestData Request Data * @throws Exception - an exception */ @Override public final void handle(final Map<String, Object> pReqVars, final IRequestData pRequestData) throws Exception { try { String processorName = pRequestData.getParameter("nmPrc"); this.srvDatabase.setIsAutocommit(false); this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); IProcessor proc = this.processorsFactory.lazyGet(pReqVars, processorName); proc.process(pReqVars, pRequestData); this.srvDatabase.commitTransaction(); } catch (Exception ex) { if (!this.srvDatabase.getIsAutocommit()) { this.srvDatabase.rollBackTransaction(); } throw ex; } finally { this.srvDatabase.releaseResources(); } }
throw ex; } finally { this.srvDatabase.releaseResources(); if (recordSet != null) { recordSet.close();
/** * <p>Handle file-report request.</p> * @param pReqVars Request scoped variables * @param pRequestData Request Data * @param pSous servlet output stream * @throws Exception - an exception */ @Override public final void handle(final Map<String, Object> pReqVars, final IRequestData pRequestData, final OutputStream pSous) throws Exception { try { this.srvDatabase.setIsAutocommit(false); this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); Date date2 = srvDate .fromIso8601DateTimeNoTz(pRequestData.getParameter("date2"), null); BalanceSheet balanceSheet = getSrvBalanceSheet() .retrieveBalance(pReqVars, date2); this.balanceSheetPdf.makeReport(pReqVars, balanceSheet, pSous); this.srvDatabase.commitTransaction(); } catch (Exception ex) { this.srvDatabase.rollBackTransaction(); throw ex; } finally { this.srvDatabase.releaseResources(); } }
this.srvDatabase.releaseResources();
throw ex; } finally { this.srvDatabase.releaseResources(); if (recordSet != null) { recordSet.close();
/** * <p>Handle request.</p> * @param pReqVars Request scoped variables * @param pRequestData Request Data * @throws Exception - an exception */ @Override public final void handle(final Map<String, Object> pReqVars, final IRequestData pRequestData) throws Exception { try { this.srvDatabase.setIsAutocommit(false); this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); Date date2 = srvDate .fromIso8601DateTimeNoTz(pRequestData.getParameter("date2"), null); BalanceSheet balanceSheet = getSrvBalanceSheet() .retrieveBalance(pReqVars, date2); pRequestData.setAttribute("balanceSheet", balanceSheet); pRequestData.setAttribute("accSettings", srvAccSettings .lazyGetAccSettings(pReqVars)); this.srvDatabase.commitTransaction(); } catch (Exception ex) { this.srvDatabase.rollBackTransaction(); throw ex; } finally { this.srvDatabase.releaseResources(); } }