Package org.apache.sandesha2.storage.beans

Examples of org.apache.sandesha2.storage.beans.SequencePropertyBean


          //checking weather an outgoing sequence with the given id
          // exists.
          SequencePropertyBeanMgr sequencePropertyBeanMgr = storageManager
              .getSequencePropretyBeanMgr();
          SequencePropertyBean sequencePropertyBean = sequencePropertyBeanMgr
              .retrieve(
                  sequenceId,
                  Sandesha2Constants.SequenceProperties.OUT_SEQUENCE_ID);
          if (sequencePropertyBean != null) {
            String outSequenceId = (String) sequencePropertyBean
                .getValue();
            if (outSequenceId != null
                && outSequenceId.equals(offeredSequenceId)) {
              refuseSequence = true;
              reason = "A sequence with offered sequenceId, already axists";
View Full Code Here


            .getAddress();
      } else {
        SequencePropertyBeanMgr seqPropMgr = storageManager
            .getSequencePropretyBeanMgr();
        String sequenceId = data.getSequenceId();
        SequencePropertyBean acksToBean = seqPropMgr.retrieve(
            sequenceId, Sandesha2Constants.SequenceProperties.ACKS_TO_EPR);
        if (acksToBean != null) {
          EndpointReference epr = (EndpointReference) acksToBean
              .getValue();
          if (epr != null)
            acksToStr = epr.getAddress();
        }
      }
View Full Code Here

    }

    SequencePropertyBeanMgr seqPropMgr = storageManager
        .getSequencePropretyBeanMgr();

    SequencePropertyBean receivedMsgBean = new SequencePropertyBean(
        sequenceId, Sandesha2Constants.SequenceProperties.RECEIVED_MESSAGES, "");
    SequencePropertyBean toBean = new SequencePropertyBean(sequenceId,
        Sandesha2Constants.SequenceProperties.TO_EPR, replyTo);
    SequencePropertyBean replyToBean = new SequencePropertyBean(sequenceId,
        Sandesha2Constants.SequenceProperties.REPLY_TO_EPR, to);
    SequencePropertyBean acksToBean = new SequencePropertyBean(sequenceId,
        Sandesha2Constants.SequenceProperties.ACKS_TO_EPR, acksTo);

    seqPropMgr.insert(receivedMsgBean);
    seqPropMgr.insert(toBean);
    seqPropMgr.insert(replyToBean);
View Full Code Here

        .getProperty(Sandesha2ClientAPI.AcksTo);

    if (toEPR == null)
      throw new SandeshaException("WS-Addressing To is null");

    SequencePropertyBean toBean = new SequencePropertyBean(iternalSequenceId,
        Sandesha2Constants.SequenceProperties.TO_EPR, toEPR);

    //Default value for acksTo is anonymous
    if (acksTo == null)
      acksTo = Sandesha2Constants.WSA.NS_URI_ANONYMOUS;

    EndpointReference acksToEPR = new EndpointReference(acksTo);
    SequencePropertyBean acksToBean = new SequencePropertyBean(
        iternalSequenceId, Sandesha2Constants.SequenceProperties.ACKS_TO_EPR,
        acksToEPR);
    seqPropMgr.insert(toBean);
    seqPropMgr.insert(acksToBean);
View Full Code Here

    if (bean == null)
      return beans;

    Iterator iterator = table.values().iterator();
    SequencePropertyBean temp;

    while (iterator.hasNext()) {
      temp = (SequencePropertyBean) iterator.next();

      boolean equal = true;

      if (bean.getSequenceId() != null
          && !bean.getSequenceId().equals(temp.getSequenceId()))
        equal = false;

      if (bean.getName() != null
          && !bean.getName().equals(temp.getName()))
        equal = false;

      if (bean.getValue() != null
          && !bean.getValue().equals(temp.getValue()))
        equal = false;

      if (equal)
        beans.add(temp);
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);

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

    EndpointReference toEPR = (EndpointReference) toBean.getValue();
    EndpointReference replyToEPR = null;
    EndpointReference acksToEPR = null;

    if (acksTo == null || "".equals(acksTo))
      acksTo = Sandesha2Constants.WSA.NS_URI_ANONYMOUS;
View Full Code Here

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

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

    ArrayList ackRangeArrayList = SandeshaUtil.getAckRangeArrayList(msgNoList,factory);
    Iterator iterator = ackRangeArrayList.iterator();
    while (iterator.hasNext()) {
      AcknowledgementRange ackRange = (AcknowledgementRange) iterator.next();
View Full Code Here

        SequencePropertyBeanMgr sequencePropMgr = storageManager
            .getSequencePropretyBeanMgr();

        //Getting the incomingSequenceIdList
        SequencePropertyBean sequencePropertyBean = (SequencePropertyBean) sequencePropMgr
            .retrieve(
                Sandesha2Constants.SequenceProperties.ALL_SEQUENCES,
                Sandesha2Constants.SequenceProperties.INCOMING_SEQUENCE_LIST);
        if (sequencePropertyBean == null)
          continue;

        ArrayList seqPropList = (ArrayList) sequencePropertyBean
            .getValue();
        Iterator seqPropIt = seqPropList.iterator();

        currentIteration: while (seqPropIt.hasNext()) {
View Full Code Here

        StorageManager storageManager = SandeshaUtil
            .getSandeshaStorageManager(rmMsgContext
                .getMessageContext().getConfigurationContext());
        SequencePropertyBeanMgr seqPropMgr = storageManager
            .getSequencePropretyBeanMgr();
        SequencePropertyBean receivedMsgsBean = seqPropMgr.retrieve(
            sequenceId,
            Sandesha2Constants.SequenceProperties.RECEIVED_MESSAGES);
        if (receivedMsgsBean != null) {
          String receivedMsgStr = (String) receivedMsgsBean
              .getValue();
          ArrayList msgNoArrList = SandeshaUtil
              .getSplittedMsgNoArraylist(receivedMsgStr);

          Iterator iterator = msgNoArrList.iterator();
          while (iterator.hasNext()) {
            String temp = (String) iterator.next();
            String msgNoStr = new Long(msgNo).toString();
            if (msgNoStr.equals(temp)) {
              drop = true;
            }
          }
         
        }

        if (drop == false) {
          //Checking for RM specific EMPTY_BODY LASTMESSAGE.
          SOAPBody body = rmMsgContext.getSOAPEnvelope().getBody();
          boolean emptyBody = false;
          if (body.getChildElements().hasNext() == false) {
            emptyBody = true;
          }

          if (emptyBody) {
            boolean lastMessage = false;
            if (sequence.getLastMessage() != null) {
              System.out
                  .println("Empty Body Last Message Received");
              drop = true;

              if (receivedMsgsBean == null) {
                receivedMsgsBean = new SequencePropertyBean(
                    sequenceId,
                    Sandesha2Constants.SequenceProperties.RECEIVED_MESSAGES,
                    "");
                seqPropMgr.insert(receivedMsgsBean);
              }

              String receivedMsgStr = (String) receivedMsgsBean
                  .getValue();
              if (receivedMsgStr != "" && receivedMsgStr != null)
                receivedMsgStr = receivedMsgStr + ","
                    + Long.toString(msgNo);
              else
                receivedMsgStr = Long.toString(msgNo);

              receivedMsgsBean.setValue(receivedMsgStr);
              seqPropMgr.update(receivedMsgsBean);

              ApplicationMsgProcessor ackProcessor = new ApplicationMsgProcessor();
              ackProcessor.sendAckIfNeeded(rmMsgContext,
                  receivedMsgStr);
View Full Code Here

      StorageManager storageManager = SandeshaUtil
          .getSandeshaStorageManager(rmMsgContext.getMessageContext()
              .getConfigurationContext());
      SequencePropertyBeanMgr seqPropMgr = storageManager
          .getSequencePropretyBeanMgr();
      SequencePropertyBean receivedMsgsBean = seqPropMgr.retrieve(
          sequenceId, Sandesha2Constants.SequenceProperties.RECEIVED_MESSAGES);
      String receivedMsgStr = (String) receivedMsgsBean.getValue();

      ApplicationMsgProcessor ackProcessor = new ApplicationMsgProcessor();
      //Even though the duplicate message is dropped, hv to send the ack
      // if needed.
      ackProcessor.sendAckIfNeeded(rmMsgContext, receivedMsgStr);
View Full Code Here

TOP

Related Classes of org.apache.sandesha2.storage.beans.SequencePropertyBean

Copyright © 2018 www.massapicom. 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.