Package org.apache.sandesha2.storage.beanmanagers

Examples of org.apache.sandesha2.storage.beanmanagers.InvokerBeanMgr.find()


    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());
    }
View Full Code Here


        RMDBean findBean = new RMDBean ();
        findBean.setPollingMode(true);
        findBean.setToAddress(replyToAddress);

        RMDBeanMgr rmdBeanMgr = storageManager.getRMDBeanMgr();
        List beans = rmdBeanMgr.find(findBean);
        if(beans.isEmpty()) {
          rmsBean.setTerminationPauserForCS(true);
          storageManager.getRMSBeanMgr().update(rmsBean);
          complete = false;
        }
View Full Code Here

        RMDBean findBean = new RMDBean ();
        findBean.setPollingMode(true);
        findBean.setToEndpointReference(replyTo);

        RMDBeanMgr rmdBeanMgr = storageManager.getRMDBeanMgr();
        List<RMDBean> beans = rmdBeanMgr.find(findBean);
        if(beans.isEmpty()) {
          rmsBean.setTerminationPauserForCS(true);
          storageManager.getRMSBeanMgr().update(rmsBean);
          complete = false;
        }
View Full Code Here

        if (sequenceId==null) {
         
          RMDBean findBean = new RMDBean ();
          findBean.setPollingMode(true);
         
          List results = rmdBeanMgr.find(findBean);
          int size = results.size();
          if (size>0) {
            Random random = new Random ();
            int item = random.nextInt(size);
            rmdBean = (RMDBean) results.get(item);
View Full Code Here

    RMDBeanMgr rmdBeanMgr = storageManager.getRMDBeanMgr();

    // removing nextMsgMgr entries
    RMDBean findRMDBean = new RMDBean();
    findRMDBean.setSequenceID(sequenceId);
    Collection collection = rmdBeanMgr.find(findRMDBean);
    Iterator iterator = collection.iterator();
    while (iterator.hasNext()) {
      RMDBean nextMsgBean = (RMDBean) iterator.next();
       rmdBeanMgr.delete(nextMsgBean.getSequenceID());
    }
View Full Code Here

    RMSBeanMgr rmsBeanMgr = storageManager.getRMSBeanMgr();

    RMSBean rmsFindBean = new RMSBean();
    rmsFindBean.setSequenceID(sequenceId);
    Collection arr = rmsBeanMgr.find(rmsFindBean);

    if (arr.size() > 0) {
      if (log.isDebugEnabled())
        log.debug("Exit: CreateSeqMsgProcessor::offerAccepted, " + false);
      return false;
View Full Code Here

    // Look for an outbound sequence
    RMSBean rmsFindBean = new RMSBean();
    rmsFindBean.setSequenceID(sequenceID);

    Collection coll = rmsBeanMgr.find(rmsFindBean);
    if (!coll.isEmpty()) {
      validSequence = true;

    } else {
      // Look for an inbound sequence
View Full Code Here

    }

    // removing the createSeqMgrEntry
    RMSBean findRMSBean = new RMSBean();
    findRMSBean.setInternalSequenceID(internalSequenceId);
    collection = rmsBeanMgr.find(findRMSBean);
    iterator = collection.iterator();
    while (iterator.hasNext()) {
      RMSBean rmsBean = (RMSBean) iterator.next();
      rmsBeanMgr.delete(rmsBean.getCreateSeqMsgID());
    }
View Full Code Here

      long timeToSend = System.currentTimeMillis() + ackInterval;

      // removing old acks.
      SenderBean findBean = new SenderBean();
      findBean.setMessageType(Sandesha2Constants.MessageTypes.ACK);
      Collection coll = senderBeanMgr.find(findBean);
      Iterator it = coll.iterator();

      if (it.hasNext()) {
        SenderBean oldAckBean = (SenderBean) it.next();
        // If there is an old Ack. This Ack will be sent in the old timeToSend.
View Full Code Here

    findSenderBean.setTimeToSend(System.currentTimeMillis());
   
    //finding the beans that go with the criteria of the passed SenderBean
    //The reSend flag is ignored for this selection, so there is no need to
    //set it.
    Collection collection = senderBeanMgr.find(findSenderBean);
   
    //removing beans that does not pass the resend test
    for (Iterator it=collection.iterator();it.hasNext();) {
      SenderBean bean = (SenderBean) it.next();
      if (!bean.isReSend() && bean.getSentCount()>0)
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.