Package com.sun.messaging.jmq.jmsserver.data

Examples of com.sun.messaging.jmq.jmsserver.data.TransactionWorkMessageAck


            // ignore non-durable subscriber
            if (!dst.isQueue() && !sid.shouldStore()) {
              continue;
            }
            if (ref.isPersistent()) {
              TransactionWorkMessageAck ack = new TransactionWorkMessageAck();
              ack.setConsumerID(sid);
              ack.setDest(dst.getDestinationUID());
              ack.setSysMessageID(sysid);
              txnWork.addMessageAcknowledgement(ack);

            }

          } catch (Exception ex) {
View Full Code Here


        .getMessageAcknowledgments();
    if (ackedMessages != null) {
      Iterator<TransactionWorkMessageAck> ackIter = ackedMessages
          .iterator();
      while (ackIter.hasNext()) {
        TransactionWorkMessageAck twma = ackIter.next();
        // TODO, check if ack needs logging
        ackedMessagesNeedLogging |= true;
      }
    }
   
View Full Code Here

        if (txid != null) {
          ackLogged = true;
        } else if (TransactionLogManager.logNonTransactedMsgAck) {

          // log non-transacted message acknowledgement
          TransactionWorkMessageAck twma = new TransactionWorkMessageAck(
              dst, mid, cid);
          txnLogManager.logNonTxnMessageAck(twma);
          ackLogged = true;
          //dont sync message store update as we have already logged in txn log.
          sync=false;
View Full Code Here

  private void replayAcknowledgedMessages(
      List<TransactionWorkMessageAck> acknowledgedMessages,
      Set dstLoadedSet) throws IOException, BrokerException {

    for (int i = 0; i < acknowledgedMessages.size(); i++) {
      TransactionWorkMessageAck messageAck = acknowledgedMessages.get(i);
      replayAcknowledgedMessage(messageAck, dstLoadedSet);

    }
  }
View Full Code Here

  public void readFromBytes(byte[] data) throws IOException, BrokerException {
    ByteArrayInputStream bais = new ByteArrayInputStream(data);
    DataInputStream dis = new DataInputStream(bais);

    dis.skip(2);
    messageAck = new TransactionWorkMessageAck();
    messageAck.readWork(dis);

    dis.close();
    bais.close();
  }
View Full Code Here

      List<TransactionWorkMessageAck> consumedMsgs = work
          .getMessageAcknowledgments();
      Iterator<TransactionWorkMessageAck> consumedIter = consumedMsgs
          .iterator();
      while (consumedIter.hasNext()) {
        TransactionWorkMessageAck msgAck = consumedIter.next();
        if (DEBUG) {
          logger.log(Logger.DEBUG, getPrefix() + " convert consumed msg "+msgAck);
        }
        DestinationUID duid = msgAck.getDestUID();
        int type = (duid.isQueue() ? DestType.DEST_TYPE_QUEUE
            : DestType.DEST_TYPE_TOPIC);
        Destination dest = Destination.getDestination(duid.getName(),
            type, true, true);
        dest.load();
        SysMessageID mid = msgAck.getSysMessageID();
        ConsumerUID cid = msgAck.getConsumerID();
        boolean sync = true;
        boolean isLastAck = false;
        TransactionAcknowledgement txAck = new TransactionAcknowledgement(mid, cid, cid);
         fileStore.storeTransactionAck(txid, txAck, false);
//        fileStore.updateInterestState(duid, mid, cid, Store.INTEREST_STATE_ACKNOWLEDGED,
View Full Code Here

TOP

Related Classes of com.sun.messaging.jmq.jmsserver.data.TransactionWorkMessageAck

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.