Package org.apache.sandesha2.storage.beans

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


    StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(configContext);
    InvokerBeanMgr storageMapBeanMgr = storageManager.getStorageMapBeanMgr();
    NextMsgBeanMgr nextMsgBeanMgr = storageManager.getNextMsgBeanMgr();
   
    //removing nextMsgMgr entries
    NextMsgBean findNextMsgBean = new NextMsgBean ();
    findNextMsgBean.setSequenceID(sequenceID);
    Collection collection = nextMsgBeanMgr.find(findNextMsgBean);
    Iterator iterator = collection.iterator();
    while (iterator.hasNext()) {
      NextMsgBean nextMsgBean = (NextMsgBean) iterator.next();
      //nextMsgBeanMgr.delete(nextMsgBean.getSequenceID());
    }
   
    removeReceivingSideProperties(configContext,sequenceID);
  }
View Full Code Here


      Collection coll = mgr.retrieveAll();
      Iterator it = coll.iterator();

      boolean contains = false;
      while (it.hasNext()) {
        NextMsgBean nextMsgBean = (NextMsgBean) it.next();
        String tempId = nextMsgBean.getSequenceID();
        if (tempId.equals(sequenceID)) {
          contains = true;
          break;
        }
      }
View Full Code Here

    Transaction invokeTransaction = storageManager.getTransaction();

    //  Pause the messages bean if not the right message to invoke.
    NextMsgBeanMgr mgr = storageManager.getNextMsgBeanMgr();
    NextMsgBean bean = mgr.retrieve(sequenceId);

    if (bean == null)
      throw new SandeshaException("Error- The sequence does not exist");

    InvokerBeanMgr storageMapMgr = storageManager.getStorageMapBeanMgr();
View Full Code Here

    if (timedOutBean!=null) {
      return SequenceReport.SEQUENCE_STATUS_TIMED_OUT;
    }
   
    NextMsgBeanMgr nextMsgMgr = storageManager.getNextMsgBeanMgr();
    NextMsgBean nextMsgBean = nextMsgMgr.retrieve(sequenceID);
   
    if (nextMsgBean!=null) {
      return SequenceReport.SEQUENCE_STATUS_ESTABLISHED;
    }
   
View Full Code Here

   
    if (toBean!=null)
      seqPropMgr.insert(toBean);

    NextMsgBeanMgr nextMsgMgr = storageManager.getNextMsgBeanMgr();
    nextMsgMgr.insert(new NextMsgBean(sequenceId, 1)); // 1 will be the next
   
    // message to invoke. This will apply for only in-order invocations.

    SandeshaUtil.startSenderForTheSequence(configurationContext,sequenceId);
   
View Full Code Here

      acksToBean.setSequenceID(offeredSequenceId);
      acksToBean.setValue(acksToEPR.getAddress());

      sequencePropMgr.insert(acksToBean);

      NextMsgBean nextMsgBean = new NextMsgBean();
      nextMsgBean.setSequenceID(offeredSequenceId);
      nextMsgBean.setNextMsgNoToProcess(1);

      NextMsgBeanMgr nextMsgMgr = storageManager.getNextMsgBeanMgr();
      nextMsgMgr.insert(nextMsgBean);
     
      String rmSpecVersion = createSeqResponseRMMsgCtx.getRMSpecVersion();
View Full Code Here

  public static void terminateReceivingSide (ConfigurationContext configContext, String sequenceID) throws SandeshaException {
    StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(configContext);
    NextMsgBeanMgr nextMsgBeanMgr = storageManager.getNextMsgBeanMgr();
   
    //removing nextMsgMgr entries
    NextMsgBean findNextMsgBean = new NextMsgBean ();
    findNextMsgBean.setSequenceId(sequenceID);
    Collection collection = nextMsgBeanMgr.find(findNextMsgBean);
    Iterator iterator = collection.iterator();
    while (iterator.hasNext()) {
      NextMsgBean nextMsgBean = (NextMsgBean) iterator.next();
      nextMsgBeanMgr.delete(nextMsgBean.getSequenceId());
    }
   
    boolean inOrderInvocation = PropertyManager.getInstance().isInOrderInvocation();
    if(inOrderInvocation) {
      terminateAfterInvocation(configContext,sequenceID);
View Full Code Here

    sendAckIfNeeded(rmMsgCtx, messagesStr);

    //  Pause the messages bean if not the right message to invoke.
    NextMsgBeanMgr mgr = storageManager.getNextMsgBeanMgr();
    NextMsgBean bean = mgr.retrieve(sequenceId);

    if (bean == null)
      throw new SandeshaException("Error- The sequence does not exist");

    InvokerBeanMgr storageMapMgr = storageManager.getStorageMapBeanMgr();

    long nextMsgno = bean.getNextMsgNoToProcess();

    if (msgCtx.isServerSide()) {
      boolean inOrderInvocation = PropertyManager.getInstance().isInOrderInvocation();
      if (inOrderInvocation) {
        //pause the message
View Full Code Here

      acksToBean.setSequenceId(offeredSequenceId);
      acksToBean.setValue(acksToEPR);

      sequencePropMgr.insert(acksToBean);

      NextMsgBean nextMsgBean = new NextMsgBean();
      nextMsgBean.setSequenceId(offeredSequenceId);
      nextMsgBean.setNextMsgNoToProcess(1);

      NextMsgBeanMgr nextMsgMgr = storageManager.getNextMsgBeanMgr();
      nextMsgMgr.insert(nextMsgBean);
    }
View Full Code Here

        Iterator it = collection.iterator();
        while (it.hasNext()) {

          //checking weather a incoming sequence with the given id
          // exists.
          NextMsgBean nextMsgBean = (NextMsgBean) it.next();
          String sequenceId = nextMsgBean.getSequenceId();
          if (sequenceId.equals(offeredSequenceId)) {
            refuseSequence = true;
            reason = "A sequence with offered sequenceId, already axists";
          }
View Full Code Here

TOP

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

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.