Package org.apache.sandesha2.storage.beanmanagers

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


        }

        Transaction postSendTransaction = storageManager.getTransaction();

        // update or delete only if the object is still present.
        SenderBean bean1 = mgr.retrieve(senderBean.getMessageID());
        if (bean1 != null) {
          if (senderBean.isReSend()) {
            bean1.setSentCount(senderBean.getSentCount());
            bean1.setTimeToSend(senderBean.getTimeToSend());
            mgr.update(bean1);
View Full Code Here


    id.setIndentifer(sequenceId);
    sequenceAck.setIdentifier(id);

    SequencePropertyBeanMgr seqPropMgr = storageManager.getSequencePropertyBeanMgr();

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

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

    while (iterator.hasNext()) {
      AcknowledgementRange ackRange = (AcknowledgementRange) iterator.next();
      sequenceAck.addAcknowledgementRanges(ackRange);
    }

    SequencePropertyBean sequenceClosedBean = seqPropMgr.retrieve(sequencePropertyKey,
        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)) {
View Full Code Here

      throws SandeshaException {
    // Transaction lastActivatedTransaction =
    // storageManager.getTransaction();
    SequencePropertyBeanMgr sequencePropertyBeanMgr = storageManager.getSequencePropertyBeanMgr();

    SequencePropertyBean lastActivatedBean = sequencePropertyBeanMgr.retrieve(sequencePropertyKey,
        Sandesha2Constants.SequenceProperties.LAST_ACTIVATED_TIME);

    boolean added = false;

    if (lastActivatedBean == null) {
View Full Code Here

  public static long getLastActivatedTime(String propertyKey, StorageManager storageManager) throws SandeshaException {

    SequencePropertyBeanMgr seqPropBeanMgr = storageManager.getSequencePropertyBeanMgr();

    SequencePropertyBean lastActivatedBean = seqPropBeanMgr.retrieve(propertyKey,
        Sandesha2Constants.SequenceProperties.LAST_ACTIVATED_TIME);

    long lastActivatedTime = -1;

    if (lastActivatedBean != null) {
View Full Code Here

  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

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.