Package org.apache.sandesha2.storage

Examples of org.apache.sandesha2.storage.Transaction.rollback()


      msgContext.pause();
      returnValue = InvocationResponse.SUSPEND;

      if (!withinTransaction) {
        try {
          transaction.rollback();
          msgContext.setProperty(Sandesha2Constants.WITHIN_TRANSACTION, Sandesha2Constants.VALUE_FALSE);
          rolebacked = true;
        } catch (Exception e1) {
          String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.rollbackError, e1.toString());
          log.debug(message, e);
View Full Code Here


        nextMsgNo++;
        rmdBean.setNextMsgNoToProcess(nextMsgNo);
        rmdBeanMgr.update(rmdBean);
      }
    } catch (SandeshaStorageException e) {
      transaction.rollback();
    } catch (SandeshaException e) {
      if (log.isErrorEnabled())
          log.error(e);
    } catch (Exception e) {
      if (log.isErrorEnabled())
View Full Code Here

      String message = "Sender got an Storage exception. Transaction will be rollbacked";
      if (log.isErrorEnabled())
        log.error(message,e);

      if (transaction!=null && transaction.isActive())
        transaction.rollback();
    } catch (Exception e) {
      String message = "Sender got an  exception";
     
      if (log.isErrorEnabled())
        log.error(message,e);
View Full Code Here

      sequenceReport.setSequenceStatus(SequenceReport.SEQUENCE_STATUS_ESTABLISHED);
      fillOutgoingSequenceInfo(sequenceReport, outSequenceID, seqPropMgr);

    } catch (Exception e) {
      if (!withinTransaction && reportTransaction!=null) {
        reportTransaction.rollback();
        configurationContext.setProperty(Sandesha2Constants.WITHIN_TRANSACTION, Sandesha2Constants.VALUE_FALSE);
        rolebacked = true;
      }
    } finally {
      if (!withinTransaction && !rolebacked && reportTransaction!=null) {
View Full Code Here

        sandeshaReport.addToSequenceStatusMap(sequenceID, sequenceReport.getSequenceStatus());
      }

    } catch (Exception e) {
      if (!withinTransaction && reportTransaction!=null) {
        reportTransaction.rollback();
        rolebacked = true;
      }
    } finally {
      if (!withinTransaction && !rolebacked && reportTransaction!=null) {
        reportTransaction.commit();
View Full Code Here

     
      return sequenceReport;

    } catch (Exception e) {
      if (!withinTransaction && reportTransaction!=null) {
        reportTransaction.rollback();
        configCtx.setProperty(Sandesha2Constants.WITHIN_TRANSACTION, Sandesha2Constants.VALUE_FALSE);
        rolebacked = true;
      }
    } finally {
      if (!withinTransaction && !rolebacked && reportTransaction!=null) {
View Full Code Here

        //TODO rollback only if a SandeshaStorageException.
        //This allows the other Exceptions to be used within the Normal flow.
       
        if (transaction != null) {
          try {
            transaction.rollback();
            rolebacked = true;
          } catch (Exception e1) {
            String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.rollbackError, e1
                .toString());
            log.debug(message, e1);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.