this.srvDatabase.commitTransaction(); } catch (Exception ex) { this.srvDatabase.rollBackTransaction(); throw ex; } finally {
this.srvDatabase.rollBackTransaction(); throw ex; } finally {
this.srvDatabase.commitTransaction(); } catch (Exception ex) { this.srvDatabase.rollBackTransaction(); throw ex; } finally {
this.srvDatabase.commitTransaction(); } catch (Exception ex) { this.srvDatabase.rollBackTransaction(); throw ex; } finally {
this.srvDatabase.commitTransaction(); } catch (Exception ex) { this.srvDatabase.rollBackTransaction(); throw ex; } finally {
this.srvDatabase.rollBackTransaction(); throw ex; } finally {
this.srvDatabase.commitTransaction(); } catch (Exception ex) { this.srvDatabase.rollBackTransaction(); throw ex; } finally {
this.srvDatabase.commitTransaction(); } catch (Exception ex) { this.srvDatabase.rollBackTransaction(); throw ex; } finally {
this.srvDatabase.commitTransaction(); } catch (Exception ex) { this.srvDatabase.rollBackTransaction(); throw ex; } finally {
this.srvDatabase.rollBackTransaction(); throw ex;
/** * <p>Print entity.</p> * @param pReq - servlet request * @throws Exception - an exception */ @Override public final void print(final HttpServletRequest pReq) throws Exception { try { this.srvDatabase.setIsAutocommit(false); this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); retrieveEntityAndPutIntoRequest(pReq); this.srvDatabase.commitTransaction(); } catch (Exception ex) { this.srvDatabase.rollBackTransaction(); throw ex; } finally { this.srvDatabase.releaseResources(); } }
/** * <p>Confirm delete entity from owned list.</p> * @param pReq - servlet request, * @throws Exception - an exception */ @Override public final void confirmDeleteFromOwnedList( final HttpServletRequest pReq) throws Exception { try { this.srvDatabase.setIsAutocommit(false); this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); retrieveEntityFromOwnedListAndPutIntoRequest(pReq); this.srvDatabase.commitTransaction(); } catch (Exception ex) { this.srvDatabase.rollBackTransaction(); throw ex; } finally { this.srvDatabase.releaseResources(); } }
/** * <p>Confirm delete entity.</p> * @param pReq - servlet request * @throws Exception - an exception */ @Override public final void confirmDelete( final HttpServletRequest pReq) throws Exception { try { this.srvDatabase.setIsAutocommit(false); this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); retrieveEntityAndPutIntoRequest(pReq); this.srvDatabase.commitTransaction(); } catch (Exception ex) { this.srvDatabase.rollBackTransaction(); throw ex; } finally { this.srvDatabase.releaseResources(); } }
/** * <p>Edit entity from owned list.</p> * @param pReq - servlet request, * @throws Exception - an exception */ @Override public final void editFromOwnedList( final HttpServletRequest pReq) throws Exception { try { this.srvDatabase.setIsAutocommit(false); this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); retrieveEntityFromOwnedListAndPutIntoRequest(pReq); this.srvDatabase.commitTransaction(); } catch (Exception ex) { this.srvDatabase.rollBackTransaction(); throw ex; } finally { this.srvDatabase.releaseResources(); } }
/** * <p>Retrieve entity page.</p> * @param pReq - servlet request * @param pUser - pUser * @throws Exception - an exception */ @Override public final void retrievePage( final HttpServletRequest pReq) throws Exception { try { this.srvDatabase.setIsAutocommit(false); this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); retrievePageUntransactinal(pReq); this.srvDatabase.commitTransaction(); } catch (Exception ex) { this.srvDatabase.rollBackTransaction(); throw ex; } finally { this.srvDatabase.releaseResources(); } }
/** * <p>View entity.</p> * @param pReq - servlet request * @throws Exception - an exception */ @Override public final void view(final HttpServletRequest pReq) throws Exception { try { this.srvDatabase.setIsAutocommit(false); this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); retrieveEntityAndPutIntoRequest(pReq); this.srvDatabase.commitTransaction(); } catch (Exception ex) { this.srvDatabase.rollBackTransaction(); throw ex; } finally { this.srvDatabase.releaseResources(); } }
/** * <p>Edit entity.</p> * @param pReq - servlet request * @throws Exception - an exception */ @Override public final void edit(final HttpServletRequest pReq) throws Exception { try { this.srvDatabase.setIsAutocommit(false); this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); retrieveEntityAndPutIntoRequest(pReq); this.srvDatabase.commitTransaction(); } catch (Exception ex) { this.srvDatabase.rollBackTransaction(); throw ex; } finally { this.srvDatabase.releaseResources(); } }
/** * <p>Handle request.</p> * @param pRequestData Request Data * @throws Exception - an exception */ @Override public final void handleRequest( final IRequestData pRequestData) throws Exception { try { this.srvDatabase.setIsAutocommit(false); this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); Date date2 = new Date(Long.parseLong(pRequestData .getParameter("date2"))); BalanceSheet balanceSheet = getSrvBalanceSheet() .retrieveBalance(null, date2); pRequestData.setAttribute("balanceSheet", balanceSheet); pRequestData.setAttribute("accSettings", srvAccSettings .lazyGetAccSettings()); this.srvDatabase.commitTransaction(); } catch (Exception ex) { this.srvDatabase.rollBackTransaction(); throw ex; } finally { this.srvDatabase.releaseResources(); } }
/** * <p>Handle request.</p> * @param pRequestData Request Data * @throws Exception - an exception */ @Override public final void handleRequest( final IRequestData pRequestData) throws Exception { try { this.srvDatabase.setIsAutocommit(false); this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); DatabaseInfo databaseInfo = getSrvOrm() .retrieveEntityWithConditions(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(); } }
/** * <p> * Read entities from stream (by given reader) and insert them * into DB with no changes. DB must be emptied before coping. * </p> * @param pReader Reader * @param pAddParam additional params * @throws Exception - an exception **/ @Override public final void readAndStoreEntities(final Reader pReader, final Map<String, Object> pAddParam) 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(pReader, null); this.srvOrm.insertEntity(entity); } this.srvDatabase.commitTransaction(); } catch (Exception ex) { this.srvDatabase.rollBackTransaction(); throw ex; } finally { this.srvDatabase.releaseResources(); } }