Package org.apache.sandesha2.storage

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


      StorageManager serverMgr = SandeshaUtil.getInMemoryStorageManager(serverConfigCtx);
      t = serverMgr.getTransaction();
      RMDBean rMDBean = serverMgr.getRMDBeanMgr().retrieve(inboundSequenceID);
      assertNotNull(rMDBean);
      assertEquals(rMDBean.getNextMsgNoToProcess(), 4);
      t.commit();
    }
    finally{
      configContext.getListenerManager().stop();
      serviceClient.cleanup();     
    }
View Full Code Here


    Transaction transaction = storageManager.getTransaction();
   
    // Get the highest out message property
    RMSBean rmsBean = SandeshaUtil.getRMSBeanFromInternalSequenceId(storageManager, internalSequenceId);
   
    transaction.commit();
   
    long highestOutMsgNum = rmsBean.getHighestOutMessageNumber();
    Long highestOutMsgKey = new Long(highestOutMsgNum);
   
    long timeNow = System.currentTimeMillis();
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[] = getCloseMessageAsBytes(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[] = getAckRequestMessageAsBytes(seqID);
View Full Code Here

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

            storageManager.getRMDBeanMgr().delete(bean.getSequenceID());
          } else {
            bean.setTerminated(true);
            storageManager.getRMDBeanMgr().update(bean);
          }
          tran.commit();
          break;       
        }
       
        lastError = new Error("App message has not arrived");
      }
View Full Code Here

    // Create a transaction and insert the RMSBean
    Transaction tran = storageManager.getTransaction();
   
    rmsBeanMgr.insert(rmsBean);
   
    tran.commit();
   
    // Open a connection to the endpoint, using the sequence ack as the action
    HttpURLConnection connection =
      FaultTestUtils.getHttpURLConnection("http://127.0.0.1:" + serverPort + "/axis2/services/RMSampleService",
          "http://docs.oasis-open.org/ws-rx/wsrm/200702/SequenceAcknowledgement");
View Full Code Here

    rmsBeanMgr.insert(rmsBean);
    senderMgr.insert(bean1);
    senderMgr.insert(bean2);
    senderMgr.insert(bean3);   
   
    tran.commit();
   
    // Open a connection to the endpoint, using the sequence ack as the action
    HttpURLConnection connection =
      FaultTestUtils.getHttpURLConnection("http://127.0.0.1:" + serverPort + "/axis2/services/RMSampleService",
          "http://docs.oasis-open.org/ws-rx/wsrm/200702/SequenceAcknowledgement");
View Full Code Here

          bean.setTransportAvailable(false);
          senderBeanMgr.update(bean);
        }
       
        // Commit the update
        if(transaction != null && transaction.isActive()) transaction.commit();
        transaction = null;
       
        if (log.isDebugEnabled())
          log.debug("Exit: SenderWorker::run, no response transport for anonymous message");
        return;
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.