Package org.apache.sandesha2.storage.beanmanagers

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


    if (sequenceReport.getSequenceStatus()!=SequenceReport.SEQUENCE_STATUS_ESTABLISHED)
      throw new SandeshaException ("Canot close the sequence since it is not active");
   
    StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(configurationContext);
    SequencePropertyBeanMgr seqPropMgr = storageManager.getSequencePropretyBeanMgr();
    SequencePropertyBean sequenceIDBean = seqPropMgr.retrieve(internalSequenceID,Sandesha2Constants.SequenceProperties.OUT_SEQUENCE_ID);
    if (sequenceIDBean==null)
      throw new SandeshaException ("SequenceIdBean is not set");
   
    String sequenceID = sequenceIDBean.getValue();
View Full Code Here


 
  private static byte getServerSequenceStatus (String sequenceID,StorageManager storageManager) throws SandeshaException {
   
    SequencePropertyBeanMgr seqPropMgr = storageManager.getSequencePropretyBeanMgr();
   
    SequencePropertyBean terminatedBean = seqPropMgr.retrieve(sequenceID,Sandesha2Constants.SequenceProperties.SEQUENCE_TERMINATED);
    if (terminatedBean!=null) {
      return SequenceReport.SEQUENCE_STATUS_TERMINATED;
    }
   
    SequencePropertyBean timedOutBean = seqPropMgr.retrieve(sequenceID,Sandesha2Constants.SequenceProperties.SEQUENCE_TIMED_OUT);
View Full Code Here

    SequencePropertyBean terminatedBean = seqPropMgr.retrieve(sequenceID,Sandesha2Constants.SequenceProperties.SEQUENCE_TERMINATED);
    if (terminatedBean!=null) {
      return SequenceReport.SEQUENCE_STATUS_TERMINATED;
    }
   
    SequencePropertyBean timedOutBean = seqPropMgr.retrieve(sequenceID,Sandesha2Constants.SequenceProperties.SEQUENCE_TIMED_OUT);
    if (timedOutBean!=null) {
      return SequenceReport.SEQUENCE_STATUS_TIMED_OUT;
    }
   
    NextMsgBeanMgr nextMsgMgr = storageManager.getNextMsgBeanMgr();
View Full Code Here

    if (sequenceReport.getSequenceStatus()!=SequenceReport.SEQUENCE_STATUS_ESTABLISHED)
      throw new SandeshaException ("Canot terminate the sequence since it is not active");
   
    StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(configurationContext);
    SequencePropertyBeanMgr seqPropMgr = storageManager.getSequencePropretyBeanMgr();
    SequencePropertyBean sequenceIDBean = seqPropMgr.retrieve(internalSequenceID,Sandesha2Constants.SequenceProperties.OUT_SEQUENCE_ID);
    if (sequenceIDBean==null)
      throw new SandeshaException ("SequenceIdBean is not set");
   
    String sequenceID = sequenceIDBean.getValue();
View Full Code Here

  public static void updateLastActivatedTime (String propertyKey, ConfigurationContext configContext) throws SandeshaException {
    StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(configContext);
    //Transaction lastActivatedTransaction = storageManager.getTransaction();
    SequencePropertyBeanMgr sequencePropertyBeanMgr = storageManager.getSequencePropretyBeanMgr();
   
    SequencePropertyBean lastActivatedBean = sequencePropertyBeanMgr.retrieve(propertyKey, Sandesha2Constants.SequenceProperties.LAST_ACTIVATED_TIME);
   
    boolean added = false;
   
    if (lastActivatedBean==null) {
      added = true;
View Full Code Here

  public static long getLastActivatedTime (String propertyKey, ConfigurationContext configContext) throws SandeshaException {
   
    StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(configContext);
    SequencePropertyBeanMgr seqPropBeanMgr = storageManager.getSequencePropretyBeanMgr();
   
    SequencePropertyBean lastActivatedBean = seqPropBeanMgr.retrieve(propertyKey,Sandesha2Constants.SequenceProperties.LAST_ACTIVATED_TIME);
   
    long lastActivatedTime = -1;
   
    if (lastActivatedBean!=null) {
      lastActivatedTime = Long.parseLong(lastActivatedBean.getValue());
View Full Code Here

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

    SequencePropertyBean ackedMsgBean = seqPropBeanMgr.retrieve(sequenceID,Sandesha2Constants.SequenceProperties.NO_OF_OUTGOING_MSGS_ACKED);
    if (ackedMsgBean==null)
      return 0; //No acknowledgement has been received yet.
   
    long noOfMessagesAcked = Long.parseLong(ackedMsgBean.getValue());
    transaction.commit();
View Full Code Here

    }
   
    SequencePropertyBean seqIDBean = (SequencePropertyBean) seqIDBeans.iterator().next();
    String sequenceID = seqIDBean.getSequenceID();
   
    SequencePropertyBean terminateAddedBean = seqPropBeanMgr.retrieve(sequenceID,Sandesha2Constants.SequenceProperties.TERMINATE_ADDED);
    if (terminateAddedBean==null)
      return false;
   
    if ("true".equals(terminateAddedBean.getValue()))
      return true;
View Full Code Here

   
    StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(configurationContext);
    Transaction transaction = storageManager.getTransaction();
    SequencePropertyBeanMgr seqPropBeanMgr = storageManager.getSequencePropretyBeanMgr();
   
    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

        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);
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.