Examples of SysMessageID


Examples of com.sun.messaging.jmq.io.SysMessageID

    void moveMessage(Packet message, DestinationUID from,
  DestinationUID to, ConsumerUID[] ints, int[] states)
  throws IOException, BrokerException {

  SysMessageID mid = message.getSysMessageID();

  // sanity check
  DstMsgStore fromdst = getDstMsgStore(from);
  if (fromdst == null || !fromdst.containsMsg(mid)) {
      logger.log(Logger.ERROR,
View Full Code Here

Examples of com.sun.messaging.jmq.io.SysMessageID

    }

    MessageInfo storeMessage(Packet message, ConsumerUID[] iids, int[] states)
        throws IOException, BrokerException {

  SysMessageID id = message.getSysMessageID();
        MessageInfo info = new MessageInfo(this, message, iids, states);

        // cache it, make sure to use the cloned SysMessageID
        Object oldmsg = messageMap.putIfAbsent(info.getID(), info);
        if (oldmsg != null) {
View Full Code Here

Examples of com.sun.messaging.jmq.io.SysMessageID

            Packet pkt = new Packet(false);
            pkt.generateTimestamp(false);
            pkt.generateSequenceNumber(false);
            pkt.readPacket(dis);

            SysMessageID mid = pkt.getSysMessageID();

            // Make sure dst exists; autocreate if possible
            Destination dst = Destination.getDestination(
                pkt.getDestination(),
                pkt.getIsQueue() ? DestType.DEST_TYPE_QUEUE
View Full Code Here

Examples of com.sun.messaging.jmq.io.SysMessageID

        int ackCount = dis.readInt(); // Number of acks
        for (int i = 0; i < ackCount; i++) {
            String name = dis.readUTF(); // Destination ID
            DestinationUID did = new DestinationUID(name);
            SysMessageID mid = new SysMessageID();
            mid.readID(dis); // SysMessageID
            ConsumerUID iid = new ConsumerUID(dis.readLong()); // ConsumerUID

            // Make sure dst exists; autocreate if possible
            Destination dst = Destination.getDestination(
                did.getName(),
View Full Code Here

Examples of com.sun.messaging.jmq.io.SysMessageID

  public void messageLogged(TransactionWorkMessage twm) {
    if (Store.getDEBUG()) {
      String msg = getPrefix() + " messageLogged()" + twm;
      logger.log(Logger.DEBUG, msg);
    }
    SysMessageID id = twm.getMessage().getSysMessageID();
    loggedSendsSinceLastCheckpoint.put(id, id);
  }
View Full Code Here

Examples of com.sun.messaging.jmq.io.SysMessageID

                        Enumeration e = jdbcStore.messageEnumeration(dstArray[i]);
                        try {
                        for (; e.hasMoreElements();) {
                            DestinationUID did = dstArray[i].getDestinationUID();
                            Packet message = (Packet)e.nextElement();
                            SysMessageID mid = message.getSysMessageID();

                            // Get interest states for the message; Consumer State table
                            HashMap stateMap = jdbcStore.getInterestStates(did, mid);
                            if (stateMap == null || stateMap.isEmpty()) {
                                bkrFS.storeMessage(did, message, false);
View Full Code Here

Examples of com.sun.messaging.jmq.io.SysMessageID

                    for (int i = 0, len = dstArray.length; i < len; i++) {
                        for (Enumeration e = bkrFS.messageEnumeration(dstArray[i]);
                            e.hasMoreElements();) {
                            DestinationUID did = dstArray[i].getDestinationUID();
                            Packet message = (Packet)e.nextElement();
                            SysMessageID mid = message.getSysMessageID();

                            // Get interest states for the message; Consumer State table
                            HashMap stateMap = bkrFS.getInterestStates(did, mid);
                            if (stateMap == null || stateMap.isEmpty()) {
                                jdbcStore.storeMessage(
View Full Code Here

Examples of com.sun.messaging.jmq.io.SysMessageID

    }

    MessageInfo storeMessage(Packet message, ConsumerUID[] iids, int[] states,
  boolean sync) throws IOException, BrokerException {

  SysMessageID id = message.getSysMessageID();

        // just check the cached map; all messages should be
        // loaded before this is called
        if (messageMap.containsKey(id)) {
            logger.log(logger.ERROR, br.E_MSG_EXISTS_IN_STORE, id, myDestination);
            throw new BrokerException(
                br.getString(br.E_MSG_EXISTS_IN_STORE, id, myDestination));
        }

        try {
            int msgsize = message.getPacketSize();

            MessageInfo info = null;
            if (vrfile != null &&
                (maxRecordSize == 0 || msgsize < maxRecordSize)) {

                // store in vrfile
                info = new MessageInfo(this, vrfile, message, iids, states, sync);
            } else {
                // store in individual file
                info = new MessageInfo(this, message, iids, states, sync);
            }

            // cache it, make sure to use the cloned SysMessageID
            messageMap.put(info.getID(), info);

            // increate destination message count and byte count
            incrMsgCount(msgsize);

            return info;
        } catch (IOException e) {
            logger.log(logger.ERROR, br.X_PERSIST_MESSAGE_FAILED,
                    id.toString(), e);
            throw e;
        }
    }
View Full Code Here

Examples of com.sun.messaging.jmq.io.SysMessageID

  MessageInfo minfo = new MessageInfo(this, data, attachment);

  // if everything is ok, we cache it
  // make sure to use the cloned SysMessageID
  SysMessageID mid = minfo.getID();
  messageMap.put(mid, minfo);

  return mid;
    }
View Full Code Here

Examples of com.sun.messaging.jmq.io.SysMessageID

  private void replaySentMessage(TransactionWorkMessage workMessage,
      Set dstLoadedSet) throws IOException, BrokerException {
    // Reconstruct the message
    Packet pkt = workMessage.getMessage();

    SysMessageID mid = pkt.getSysMessageID();
    if (Store.getDEBUG()) {
      String msg = getPrefix() + " replaying sent message: "
          + workMessage + " dest= "+pkt.getDestination();
      logger.log(Logger.INFO, msg);
    }
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.