Package org.apache.sandesha2.storage.beanmanagers

Examples of org.apache.sandesha2.storage.beanmanagers.CreateSeqBeanMgr.retrieve()


  public static long getLastActivatedTime (String propertyKey, ConfigurationContext configContext) throws SandeshaException {
   
    StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(configContext);
    SequencePropertyBeanMgr seqPropBeanMgr = storageManager.getSequencePropretyBeanMgr();
   
    SequencePropertyBean lastActivatedBean = seqPropBeanMgr.retrieve(propertyKey,Sandesha2Constants.SequenceProperties.LAST_ACTIVATED_TIME);
   
    long lastActivatedTime = -1;
   
    if (lastActivatedBean!=null) {
      lastActivatedTime = Long.parseLong(lastActivatedBean.getValue());
View Full Code Here


    }
   
    SequencePropertyBean seqIDBean = (SequencePropertyBean) seqIDBeans.iterator().next();
    String sequenceID = seqIDBean.getSequenceID();

    SequencePropertyBean ackedMsgBean = seqPropBeanMgr.retrieve(sequenceID,Sandesha2Constants.SequenceProperties.NO_OF_OUTGOING_MSGS_ACKED);
    if (ackedMsgBean==null)
      return 0; //No acknowledgement has been received yet.
   
    long noOfMessagesAcked = Long.parseLong(ackedMsgBean.getValue());
    transaction.commit();
View Full Code Here

    }
   
    SequencePropertyBean seqIDBean = (SequencePropertyBean) seqIDBeans.iterator().next();
    String sequenceID = seqIDBean.getSequenceID();
   
    SequencePropertyBean terminateAddedBean = seqPropBeanMgr.retrieve(sequenceID,Sandesha2Constants.SequenceProperties.TERMINATE_ADDED);
    if (terminateAddedBean==null)
      return false;
   
    if ("true".equals(terminateAddedBean.getValue()))
      return true;
View Full Code Here

   
    StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(configurationContext);
    Transaction transaction = storageManager.getTransaction();
    SequencePropertyBeanMgr seqPropBeanMgr = storageManager.getSequencePropretyBeanMgr();
   
    SequencePropertyBean terminateReceivedBean = seqPropBeanMgr.retrieve(sequenceID,Sandesha2Constants.SequenceProperties.TERMINATE_RECEIVED);
    boolean complete = false;
   
    if (terminateReceivedBean!=null && "true".equals(terminateReceivedBean.getValue()))
      complete = true;
   
View Full Code Here

        offerPart.setIdentifier(identifier);
        createSequencePart.setSequenceOffer(offerPart);
      }
    }

    SequencePropertyBean replyToBean = seqPropMgr.retrieve(
        internalSequenceId,
        Sandesha2Constants.SequenceProperties.REPLY_TO_EPR);
    SequencePropertyBean toBean = seqPropMgr.retrieve(internalSequenceId,
        Sandesha2Constants.SequenceProperties.TO_EPR);
View Full Code Here

    }

    SequencePropertyBean replyToBean = seqPropMgr.retrieve(
        internalSequenceId,
        Sandesha2Constants.SequenceProperties.REPLY_TO_EPR);
    SequencePropertyBean toBean = seqPropMgr.retrieve(internalSequenceId,
        Sandesha2Constants.SequenceProperties.TO_EPR);

    if (toBean == null || toBean.getValue() == null)
      throw new SandeshaException("To EPR is not set.");
View Full Code Here

    StorageManager storageManager = SandeshaUtil
        .getSandeshaStorageManager(ctx);
    SequencePropertyBeanMgr seqPropMgr = storageManager
        .getSequencePropretyBeanMgr();

    SequencePropertyBean seqBean = seqPropMgr.retrieve(sequenceId,
        Sandesha2Constants.SequenceProperties.SERVER_COMPLETED_MESSAGES);
    String msgNoList = (String) seqBean.getValue();

    ArrayList ackRangeArrayList = SandeshaUtil.getAckRangeArrayList(
        msgNoList, factory,rmNamespaceValue);
View Full Code Here

          .next();
      sequenceAck.addAcknowledgementRanges(ackRange);
    }
   
   
    SequencePropertyBean sequenceClosedBean = seqPropMgr.retrieve(sequenceId,Sandesha2Constants.SequenceProperties.SEQUENCE_CLOSED );
   
    if (sequenceClosedBean!=null && Sandesha2Constants.VALUE_TRUE.equals(sequenceClosedBean.getValue())) {
      //sequence is closed. so add the 'Final' part.
      if (SpecSpecificConstants.isAckFinalAllowed(rmVersion)) {
        AckFinal ackFinal = new AckFinal (factory,rmNamespaceValue);
View Full Code Here

    ConfigurationContext configurationContext = rmMsgCtx.getMessageContext().getConfigurationContext();
    StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(configurationContext);
    SequencePropertyBeanMgr seqPropMgr = storageManager.getSequencePropretyBeanMgr();
   
    //Setting the ack depending on AcksTo.
    SequencePropertyBean acksToBean = seqPropMgr.retrieve(sequenceID,
        Sandesha2Constants.SequenceProperties.ACKS_TO_EPR);

    EndpointReference acksTo = new EndpointReference(acksToBean.getValue());
    String acksToStr = acksTo.getAddress();
View Full Code Here

    lastUpdatedTimeTransaction.commit();
   
    //Starting transaction
    Transaction ackTransaction = storageManager.getTransaction();

    SequencePropertyBean internalSequenceBean = seqPropMgr.retrieve(
        outSequenceId, Sandesha2Constants.SequenceProperties.INTERNAL_SEQUENCE_ID);

    if (internalSequenceBean == null || internalSequenceBean.getValue() == null) {
      String message = "TempSequenceId is not set correctly";
      log.debug(message);
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.