Package org.apache.sandesha2.storage

Examples of org.apache.sandesha2.storage.Transaction.commit()


      Transaction tran = storageManager.getTransaction();
     
      RMDBean finderBean = new RMDBean();
      List rmdBeans = storageManager.getRMDBeanMgr().find(finderBean);
     
      tran.commit();
     
      lastError = null;
     
      if (rmdBeans.isEmpty())
        lastError = new Error("rmdBeans empty " + rmdBeans);
View Full Code Here


      Transaction tran = storageManager.getTransaction();
     
      RMDBean finderBean = new RMDBean();
      List rmdBeans = storageManager.getRMDBeanMgr().find(finderBean);
     
      tran.commit();
     
      lastError = null;
     
      if (!rmdBeans.isEmpty())
        lastError = new Error("rmdBeans not empty " + rmdBeans);
View Full Code Here

    // Create a transaction and insert the RMSBean
    Transaction tran = storageManager.getTransaction();
   
    rmdBeanMgr.insert(rmdBean);
   
    tran.commit();

   
    OutputStream tmpOut2 = connection.getOutputStream();

    byte ar[] = getAppMessageAsBytes(seqID);
View Full Code Here

    // Create a transaction and insert the RMSBean
    Transaction tran = storageManager.getTransaction();
   
    rmdBeanMgr.insert(rmdBean);
   
    tran.commit();

   
    OutputStream tmpOut2 = connection.getOutputStream();

    byte ar[] = getAppMessageAsBytes(seqID);
View Full Code Here

        //only the ackRequested bean will be present.
        assertTrue("SenderBeans found when the list should be empty", (beans.size()==1));
       
        SequenceReport sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
   
        transaction.commit();
        assertNotNull(sequenceReport.getSequenceID());
        assertFalse(sequenceReport.isSecureSequence());

        lastError = null;
        break;
View Full Code Here

      Transaction tran = storageManager.getTransaction();
     
      RMSBean finderBean = new RMSBean();
      List rmsBeans = storageManager.getRMSBeanMgr().find(finderBean);
     
      tran.commit();
     
      lastError = null;
     
      if (!rmsBeans.isEmpty())
        lastError = new Error("rmsBeans not empty " + rmsBeans);
View Full Code Here

      Thread.sleep(5000);
      StorageManager mgr = SandeshaUtil.getInMemoryStorageManager(configContext);
      Transaction t = mgr.getTransaction();
      String inboundSequenceID = SandeshaUtil.getSequenceIDFromInternalSequenceID(SandeshaUtil.getInternalSequenceID(to, sequenceKey),
          mgr);
      t.commit();
     
      SandeshaClient.forceDispatchOfInboundMessages(serverConfigCtx,
          inboundSequenceID,
          true); //allow later msgs to be delivered
     
View Full Code Here

     
      //also check that the sequence has an out of order gap that contains msg 2     
      assertNotNull(rMDBean.getOutOfOrderRanges());
      RangeString rangeString = rMDBean.getOutOfOrderRanges();
      assertTrue(rangeString.isMessageNumberInRanges(2));
      t.commit();
     
      //we deliver msg 2
      //set highest out msg number to 1
      String internalSequenceId = SandeshaUtil.getInternalSequenceID(to, sequenceKey);
      t = mgr.getTransaction();
View Full Code Here

      t = mgr.getTransaction();
      RMSBean rmsBean = SandeshaUtil.getRMSBeanFromInternalSequenceId(mgr, internalSequenceId);
      rmsBean.setNextMessageNumber(1);
      // Update the bean
      mgr.getRMSBeanMgr().update(rmsBean);
      t.commit();
     
      clientOptions.setProperty(SandeshaClientConstants.MESSAGE_NUMBER,new Long(2));
      serviceClient.fireAndForget(getPingOMBlock("ping2"));
    }
    finally{
View Full Code Here

     
      StorageManager mgr = SandeshaUtil.getInMemoryStorageManager(configContext);
      Transaction t = mgr.getTransaction();
      String inboundSequenceID = SandeshaUtil.getSequenceIDFromInternalSequenceID(internalSequenceId,
          mgr);
      t.commit();
     
      SandeshaClient.forceDispatchOfInboundMessages(serverConfigCtx, inboundSequenceID, false);
     
      //check that the server is now expecting msg 4
      StorageManager serverMgr = SandeshaUtil.getInMemoryStorageManager(serverConfigCtx);
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.