Package org.apache.sandesha2.storage.beanmanagers

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


  public static long getOutGoingSequenceAckedMessageCount(String sequencePropertyKey, StorageManager storageManager)
      throws SandeshaException {
    // / Transaction transaction = storageManager.getTransaction();
    SequencePropertyBeanMgr seqPropBeanMgr = storageManager.getSequencePropertyBeanMgr();

    SequencePropertyBean ackedMsgBean = seqPropBeanMgr.retrieve(sequencePropertyKey,
        Sandesha2Constants.SequenceProperties.NO_OF_OUTGOING_MSGS_ACKED);
    if (ackedMsgBean == null)
      return 0; // No acknowledgement has been received yet.

    long noOfMessagesAcked = Long.parseLong(ackedMsgBean.getValue());
View Full Code Here


    }

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

    SequencePropertyBean terminateAddedBean = seqPropBeanMgr.retrieve(sequenceID,
        Sandesha2Constants.SequenceProperties.TERMINATE_ADDED);
    if (terminateAddedBean == null)
      return false;

    if ("true".equals(terminateAddedBean.getValue()))
View Full Code Here

      throws SandeshaException {

    // / Transaction transaction = storageManager.getTransaction();
    SequencePropertyBeanMgr seqPropBeanMgr = storageManager.getSequencePropertyBeanMgr();

    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

    //here we cannot get the property key using the usual SandeshaUtil.getSequencePropertyKey function,
    //because this can be a applicationMessage, which piggybacks the acknowledgement.
    String sequencePropertyKey = internalSequenceId;

    // Check that the sender of this Ack holds the correct token
    SequencePropertyBean tokenBean = seqPropMgr.retrieve(outSequenceId, Sandesha2Constants.SequenceProperties.SECURITY_TOKEN);
    if(tokenBean != null) {
      SecurityManager secManager = SandeshaUtil.getSecurityManager(configCtx);
      SecurityToken token = secManager.recoverSecurityToken(tokenBean.getValue());
     
      secManager.checkProofOfPossession(token, soapHeader, msgCtx);
View Full Code Here

    }
   
    // setting acked message date.
    // TODO add details specific to each message.
    long noOfMsgsAcked = getNoOfMessagesAcked(sequenceAck.getAcknowledgementRanges().iterator());
    SequencePropertyBean noOfMsgsAckedBean = seqPropMgr.retrieve(sequencePropertyKey,
        Sandesha2Constants.SequenceProperties.NO_OF_OUTGOING_MSGS_ACKED);
    boolean added = false;

    if (noOfMsgsAckedBean == null) {
      added = true;
View Full Code Here

    else
      seqPropMgr.update(noOfMsgsAckedBean);

    // setting the completed_messages list. This gives all the messages of
    // the sequence that were acked.
    SequencePropertyBean allCompletedMsgsBean = seqPropMgr.retrieve(sequencePropertyKey,
        Sandesha2Constants.SequenceProperties.CLIENT_COMPLETED_MESSAGES);
    if (allCompletedMsgsBean == null) {
      allCompletedMsgsBean = new SequencePropertyBean();
      allCompletedMsgsBean.setSequencePropertyKey(sequencePropertyKey);
      allCompletedMsgsBean.setName(Sandesha2Constants.SequenceProperties.CLIENT_COMPLETED_MESSAGES);
View Full Code Here

    MessageContext referenceMsg = referenceRMMessage.getMessageContext();

    SequencePropertyBeanMgr seqPropMgr = storageManager.getSequencePropertyBeanMgr();

    // Setting the ack depending on AcksTo.
    SequencePropertyBean acksToBean = seqPropMgr.retrieve(sequencePropertyKey,
        Sandesha2Constants.SequenceProperties.ACKS_TO_EPR);

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

    // processing for accept (offer has been sent)
    Accept accept = createSeqResponsePart.getAccept();
    if (accept != null) {
      // Find offered sequence from internal sequence id.
      SequencePropertyBean offeredSequenceBean = sequencePropMgr.retrieve(sequencePropertyKey,
          Sandesha2Constants.SequenceProperties.OFFERED_SEQUENCE);

      // TODO this should be detected in the Fault manager.
      if (offeredSequenceBean == null) {
        String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.accptButNoSequenceOffered);
View Full Code Here

  public static String getSequenceIDFromInternalSequenceID(String internalSequenceID,
      StorageManager storageManager) throws SandeshaException {

    SequencePropertyBeanMgr sequencePropertyBeanMgr = storageManager.getSequencePropertyBeanMgr();

    SequencePropertyBean outSequenceBean = sequencePropertyBeanMgr.retrieve(internalSequenceID,
        Sandesha2Constants.SequenceProperties.OUT_SEQUENCE_ID);

    String sequeunceID = null;
    if (outSequenceBean != null)
      sequeunceID = outSequenceBean.getValue();
View Full Code Here

   */
  public static String getRMVersion(String propertyKey, StorageManager storageManager)
      throws SandeshaException {

    SequencePropertyBeanMgr sequencePropertyBeanMgr = storageManager.getSequencePropertyBeanMgr();
    SequencePropertyBean specVersionBean = sequencePropertyBeanMgr.retrieve(propertyKey,
        Sandesha2Constants.SequenceProperties.RM_SPEC_VERSION);

    if (specVersionBean == null)
      return null;

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.