Package org.xmlBlaster.util.queuemsg

Examples of org.xmlBlaster.util.queuemsg.MsgQueueEntry


      if (path != null && path.equalsIgnoreCase("String")) path = null;

      ArrayList tmpList = new ArrayList();
      for (int i=0; i<list.size(); i++) {
         MsgQueueEntry entry = (MsgQueueEntry)list.get(i);
         if (entry.isExpired() || entry.isDestroyed()) continue;

         String fn = entry.getKeyOid() + entry.getUniqueId() + ".xml";
         String xml = null;

         if (entry instanceof MsgQueuePublishEntry) {
            MsgQueuePublishEntry pub = (MsgQueuePublishEntry)entry;
            xml = XmlScriptInterpreter.wrapForScripting(XmlScriptInterpreter.ROOT_TAG,
               pub.getMsgUnit(),
               "Try to publish again: java javaclients.script.XmlScript -prepareForPublish true -requestFile 'thisFileName'");
            tmpList.add(fn);
         }
         else if (entry instanceof MsgQueueConnectEntry) {
            xml = XmlScriptInterpreter.wrapForScripting(XmlScriptInterpreter.ROOT_TAG, new MsgUnit(null, null, ((MsgQueueConnectEntry)entry).getConnectQosData()), "");
            fn = MethodName.CONNECT.toString() + entry.getUniqueId() + ".xml";
            tmpList.add(fn);
         }
         else if (entry instanceof MsgQueueDisconnectEntry) {
            xml = XmlScriptInterpreter.wrapForScripting(XmlScriptInterpreter.ROOT_TAG, new MsgUnit(null, null, ((MsgQueueDisconnectEntry)entry).getDisconnectQos().getData()), "");
            fn = MethodName.DISCONNECT.toString() + entry.getUniqueId() + ".xml";
            tmpList.add(fn);
         }
         else if (entry instanceof MsgQueueEraseEntry) {
            xml = XmlScriptInterpreter.wrapForScripting(XmlScriptInterpreter.ROOT_TAG, new MsgUnit(((MsgQueueEraseEntry)entry).getEraseKey().getData(), null, ((MsgQueueEraseEntry)entry).getEraseQos().getData()), "");
            tmpList.add(fn);
         }
         else if (entry instanceof MsgQueueGetEntry) {
             xml = XmlScriptInterpreter.wrapForScripting(XmlScriptInterpreter.ROOT_TAG, new MsgUnit(((MsgQueueGetEntry)entry).getGetKey().getData(), null, ((MsgQueueGetEntry)entry).getGetQos().getData()), "");
             tmpList.add(fn);
         }
         else if (entry instanceof MsgQueueSubscribeEntry) {
             xml = XmlScriptInterpreter.wrapForScripting(XmlScriptInterpreter.ROOT_TAG, new MsgUnit(((MsgQueueSubscribeEntry)entry).getSubscribeKeyData(), null, ((MsgQueueSubscribeEntry)entry).getSubscribeQosData()), "");
             tmpList.add(fn);
         }
         else if (entry instanceof MsgQueueUnSubscribeEntry) {
             xml = XmlScriptInterpreter.wrapForScripting(XmlScriptInterpreter.ROOT_TAG, new MsgUnit(((MsgQueueUnSubscribeEntry)entry).getUnSubscribeKey().getData(), null, ((MsgQueueUnSubscribeEntry)entry).getUnSubscribeQos().getData()), "");
             tmpList.add(fn);
         }
         else { // TODO: Get a proper dump, here we only dump the queueEntry information but not the message itself
            StringBuffer sb = new StringBuffer(4096);
            sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
            sb.append("\n<xmlBlaster>");
            sb.append("\n <!-- Content dump is not yet implemented -->");
            sb.append(entry.toXml());
            sb.append("\n</xmlBlaster>");
            xml = sb.toString();
         }
         String fullName = XmlScriptInterpreter.dumpToFile(path, fn, xml);
         tmpList.add(fullName);
View Full Code Here


                     log.info("Ignoring transient entry " + ent.getLogId());
                     logToFile(queueNamePattern + "[counter=" + processed + "]: Ignoring transient entry "
                           + ent.getLogId());
                     return null;
                  }
                  MsgQueueEntry entry = (MsgQueueEntry) ent;

                  // "heron"
                  String nodeId = globalThree.getDatabaseNodeStr();
                  // MethodName: "publish", "subscribe"
                  // String relatingType = entry.getEmbeddedType();
                  // "connection_clientsubscriber1"
                  String queueName = entry.getStorageId().getOldPostfix();
                  StorageId oldStorageId = StorageId.valueOf(globalOne, queueName);
                  // "connection"
                  String relating = oldStorageId.getXBStore().getType();
                  // reset nodeId to ""
                  // nodeId = oldStorageId.getXBStore().getNode();
                  StorageId storageId = null;
                  // sn is most time null
                  SessionName sender = entry.getSender();// entry.getMsgUnit().getQosData().getSender();
                  SessionName receiver = entry.getReceiver();
                  SessionName guessed = SessionName.guessSessionName(globalOne, null, queueName,
                        limitPositivePubToOneDigit);
                  if (receiver != null && receiver.isNodeIdExplicitlyGiven())
                     nodeId = receiver.getNodeIdStr();
                  else if (guessed != null && guessed.isNodeIdExplicitlyGiven())
                     nodeId = guessed.getNodeIdStr();
                  // else if (sn != null)
                  // nodeId = sn.getNodeIdStr();
                  // if (sn != null) {
                  // storageId = new StorageId(globalThree, nodeId, relating,
                  // sn);
                  // } else {
                     // xb_entries.queueName="connection_clientpublisherToHeron2"
                     // --->
                     // xbstore.xbpostfix="client/publisherToHeron/2"
                  SessionName sn = SessionName.guessSessionName(globalOne, nodeId, queueName,
                        limitPositivePubToOneDigit);
                     storageId = new StorageId(globalThree, nodeId, relating, sn);
                  // }
                  logToFile("storageId=" + storageId.getXBStore().toString() + " from: nodeId=" + nodeId + "sender="
                        + (sender == null ? null : sender.getAbsoluteName()) + " receiver="
                        + (receiver == null ? null : receiver.getAbsoluteName()) + " guessed="
                        + (guessed == null ? null : guessed.getAbsoluteName()));
                  XBStore xbStore = getXBStore(dbAccessorClientThree, globalThree, storageId);
                  entry.getStorageId().getXBStore().setPostfix(storageId.getXBStore().getPostfix());
                  dbAccessorClientThree.addEntry(xbStore, entry);
                  processed++;
                  if ((processed % 1000) == 0)
                     logToFile(queueNamePattern + " [processed=" + processed + "] processing ...");
                  totalProcessed++;
View Full Code Here

      if (log.isLoggable(Level.FINE)) log.fine("Working with " + entryList.size() + " messages ...");

      // ... do plugin specific work ...
      ArrayList resultList = new ArrayList();
      for (int i=0; i<entryList.size(); i++) {
         MsgQueueEntry entry = (MsgQueueEntry)entryList.get(i);
         DispatchAction action = getDispatchAction(managerEntry, entry);

         if (log.isLoggable(Level.FINE)) log.fine("Working on '" + entry.getLogId() + "', action=" + action.getAction() + " from sender " + entry.getSender());

         if (managerEntry.getCurrConnectionState() == ConnectionStateEnum.ALIVE) {
            if (entry.isInternal()) {
               log.info("Sending out of bound internal message '" + entry.getLogId() + "'");
               resultList.add(entry);
               continue; // Send internal message out of bound
            }

            if (this.xmlBlasterClient.getLoginName().equals(entry.getSender().getLoginName())) {
               log.info("Sending out of bound PtP message '" + entry.getLogId() + "'");
               resultList.add(entry);
               continue; // Send PtP notifications out of bound to avoid looping
            }
         }

         if (managerEntry.getCurrConnectionState() != ConnectionStateEnum.ALIVE && action.doSend()) {
            log.severe("We are in state " + managerEntry.getCurrConnectionState() + " and the configuration tells us to send nevertheless, we queue instead: " + entry.getLogId());
            action = this.QUEUE_ACTION;
         }

         if (action.doSend()) {
            resultList.add(entry);
         }
         else if (action.doQueue()) {
            // ignore in async - put to queue in sync mode !!
            if (log.isLoggable(Level.FINE)) log.fine("Queueing holdback message " + entry.getLogId());
            try {
               putToHoldbackQueue(managerEntry, entry);
            }
            catch (XmlBlasterException e) {
               dispatchManager.getMsgErrorHandler().handleError(new MsgErrorInfo(glob, entry, dispatchManager, e));
            }
            if (log.isLoggable(Level.FINE)) log.fine("Removing from callback queue " + entry.getLogId() + " (is now a holdback message)");
            try {
               dispatchManager.getQueue().removeRandom(entry);
               if (log.isLoggable(Level.FINE)) log.fine("Callback queue size is now " + dispatchManager.getQueue().getNumOfEntries());
            }
            catch (XmlBlasterException e) {
               log.severe("PANIC: Can't remove " + entry.toXml("") + " from queue '" + dispatchManager.getQueue().getStorageId() + "': " + e.getMessage());
               e.printStackTrace();
            }
         }
         else if (action.doDestroy()) {
            try {
               dispatchManager.getQueue().removeRandom(entry);
            }
            catch (XmlBlasterException e) {
               log.severe("PANIC: Can't remove " + entry.toXml("") + " from queue '" + dispatchManager.getQueue().getStorageId() + "': " + e.getMessage());
               e.printStackTrace();
            }
         }

         if (action.doNotifySender()) {
View Full Code Here

    */
   public void createFakedReturnObjects(I_QueueEntry[] entries, String state, String stateInfo) throws XmlBlasterException {
      if (log.isLoggable(Level.FINER)) log.finer("Entering createFakedReturnObjects() for " + entries.length + " entries");

      for (int ii=0; ii<entries.length; ii++) {
         MsgQueueEntry msgQueueEntry = (MsgQueueEntry)entries[ii];
         if (!msgQueueEntry.wantReturnObj())
            continue;
         StatusQosData statRetQos = new StatusQosData(glob, MethodName.UNKNOWN);
         statRetQos.setStateInfo(stateInfo);
         statRetQos.setState(state);
         if (log.isLoggable(Level.FINE)) log.fine("Creating faked return for '" + msgQueueEntry.getMethodName() + "' invocation");

         if (MethodName.PUBLISH_ONEWAY == msgQueueEntry.getMethodName()) {
            MsgQueuePublishEntry entry = (MsgQueuePublishEntry)msgQueueEntry;
            entry.setReturnObj(null);
         }

         else if (MethodName.PUBLISH == msgQueueEntry.getMethodName()) {
            MsgQueuePublishEntry entry = (MsgQueuePublishEntry)msgQueueEntry;
            if (!entry.getMsgKeyData().hasOid()) {
               entry.getMsgKeyData().setOid(entry.getMsgKeyData().generateOid(entry.getSender().getRelativeName()));
            }
            statRetQos.setKeyOid(entry.getKeyOid());
            PublishReturnQos publishReturnQos = new PublishReturnQos(glob, statRetQos);
            //TODO: How to fake the RcvTimestamp -> it must be unique for an OID in the server
            //publishReturnQos.getData().setRcvTimestamp(new org.xmlBlaster.util.RcvTimestamp());
            entry.setReturnObj(publishReturnQos);
         }

         else if (MethodName.SUBSCRIBE == msgQueueEntry.getMethodName()) {
            if (getDispatchManager().getSessionName().getPublicSessionId() < 1) {
               // we should never allow a subscription without a positive sessionId if the
               // server is not accessible
               throw new XmlBlasterException(glob, ErrorCode.RESOURCE_TEMPORARY_UNAVAILABLE, ME,
                     "The Subscription for '" + getDispatchManager().getSessionName().toString() + "' failed since the server is currently not available");
            }
           
            MsgQueueSubscribeEntry entry = (MsgQueueSubscribeEntry)msgQueueEntry;
            if (!entry.getSubscribeQosData().hasSubscriptionId()) {
               entry.getSubscribeQosData().generateSubscriptionId(glob.getXmlBlasterAccess().getSessionName(), entry.getSubscribeKeyData());
               //String subscriptionId = QueryKeyData.generateSubscriptionId(dispatchManager.getQueue().getStorageId().getPostfix());
               //entry.getSubscribeQosData().setSubscriptionId(subscriptionId);
            }
            statRetQos.setSubscriptionId(entry.getSubscribeQosData().getSubscriptionId());
            SubscribeReturnQos subscribeReturnQos = new SubscribeReturnQos(glob, statRetQos, true);
            entry.setReturnObj(subscribeReturnQos);
         }

         else if (MethodName.UNSUBSCRIBE == msgQueueEntry.getMethodName()) {
            MsgQueueUnSubscribeEntry entry = (MsgQueueUnSubscribeEntry)msgQueueEntry;
            String id = entry.getUnSubscribeKey().getOid();
            if (id != null && id.startsWith(Constants.SUBSCRIPTIONID_PREFIX)) {
               statRetQos.setSubscriptionId(id);
               UnSubscribeReturnQos[] unSubscribeReturnQosArr = new UnSubscribeReturnQos[] { new UnSubscribeReturnQos(glob, statRetQos) };
               entry.setReturnObj(unSubscribeReturnQosArr);
            }
            else {
               throw new XmlBlasterException(glob, ErrorCode.USER_CONFIGURATION, ME,
                  "UnSubscribe on oid='" + id + "' is not possible in offline/polling mode without an exact subscription ID given. " +
                  "See 'http://www.xmlBlaster.org/xmlBlaster/doc/requirements/client.failsafe.html' for more details.");
            }
         }

         else if (MethodName.ERASE == msgQueueEntry.getMethodName()) {
            MsgQueueEraseEntry entry = (MsgQueueEraseEntry)msgQueueEntry;
            if (entry.getEraseKey().isExact()) {
               statRetQos.setKeyOid(entry.getEraseKey().getOid());
               EraseReturnQos[] eraseReturnQosArr = new EraseReturnQos[] { new EraseReturnQos(glob, statRetQos) };
               entry.setReturnObj(eraseReturnQosArr);
            }
            else {
               throw new XmlBlasterException(glob, ErrorCode.USER_CONFIGURATION, ME,
                  "Erase on oid='" + entry.getEraseKey().getOid() + "' is not possible in offline/polling mode without an exact topic oid given. " +
                  "See 'http://www.xmlBlaster.org/xmlBlaster/doc/requirements/client.failsafe.html' for more details.");
            }
         }

         else if (MethodName.CONNECT == msgQueueEntry.getMethodName()) {
            ConnectReturnQos connectReturnQos = new ConnectReturnQos(glob, ((MsgQueueConnectEntry)msgQueueEntry).getConnectQosData());
            if (!connectReturnQos.getSessionName().isPubSessionIdUser()) {
               throw new XmlBlasterException(glob, ErrorCode.USER_CONFIGURATION, ME,
                  "Can't find an xmlBlaster server. Try to provide the server host/port as described in " +
                  "http://www.xmlblaster.org/xmlBlaster/doc/requirements/client.configuration.html " +
                  "or provide a public session ID to support polling for xmlBlaster without an initial connection. " +
                  "See 'http://www.xmlBlaster.org/xmlBlaster/doc/requirements/client.failsafe.html' for more details.");
            }
            msgQueueEntry.setReturnObj(connectReturnQos);
         }

         else if (MethodName.DISCONNECT == msgQueueEntry.getMethodName()) {
            if (log.isLoggable(Level.FINE)) log.fine("disconnect returns void, nothing to do");
         }

         else if (MethodName.GET == msgQueueEntry.getMethodName()) {
            MsgQueueGetEntry entry = (MsgQueueGetEntry)msgQueueEntry;
            throw new XmlBlasterException(glob, ErrorCode.USER_CONFIGURATION, ME,
               "Synchronous GET on oid='" + entry.getGetKey().getOid() + "' is not possible in offline/polling mode. " +
               "See 'http://www.xmlBlaster.org/xmlBlaster/doc/requirements/client.failsafe.html' for more details.");
         }

         else {
            log.severe("Internal problem, MsgQueueEntry '" + msgQueueEntry.getEmbeddedType() + "' not expected here");
         }
      }
   }
View Full Code Here

    * we can generate here valid return objects
    * @param state e.g. Constants.STATE_OK
    */
   public void createFakedReturnObjects(I_QueueEntry[] entries, String state, String stateInfo) {
      for (int ii=0; ii<entries.length; ii++) {
         MsgQueueEntry msgQueueEntry = (MsgQueueEntry)entries[ii];
         if (!msgQueueEntry.wantReturnObj())
            continue;
         StatusQosData statRetQos = new StatusQosData(glob, MethodName.UPDATE);
         statRetQos.setStateInfo(stateInfo);
         statRetQos.setState(state);
         // TODO check this: it is probably wrong since here comes UPDATE_REF and not UPDATE (Michele 2003-11-05)
         // if (MethodName.UPDATE == msgQueueEntry.getMethodName()) {
         // if ( MethodName.UPDATE.getMethodName().equalsIgnoreCase(msgQueueEntry.getEmbeddedType())) {
         // !!! HACK !!!
         // "update_ref"
         if (ServerEntryFactory.ENTRY_TYPE_UPDATE_REF.equalsIgnoreCase(msgQueueEntry.getEmbeddedType())) {
            UpdateReturnQosServer ret = new UpdateReturnQosServer(glob, statRetQos);
            msgQueueEntry.setReturnObj(ret);
         }
         else {
            log.severe("Internal problem, MsgQueueEntry '" + msgQueueEntry.getEmbeddedType() + "' not expected here");
         }
      }
   }
View Full Code Here

   public static ArrayList prepareMsgsFromQueue(String logId, Logger log, I_Queue queue, List<I_Entry> entryList) {
      // Remove all expired messages and do a shallow copy
      int size = entryList.size();
      ArrayList result = new ArrayList(size);
      for (int ii=0; ii<size; ii++) {
         MsgQueueEntry entry = (MsgQueueEntry)entryList.get(ii);
         // Take care to remove the filtered away messages from the queue as well
         if (entry.isDestroyed()) {
            log.info(logId+": Message " + entry.getLogId() + " is destroyed, ignoring it");
            if (log.isLoggable(Level.FINE)) log.fine("Message " + entry.getLogId() + " is destroyed, ignoring it: " + entry.toXml());
            try {
               queue.removeRandom(entry); // Probably change to use [] for better performance
            }
            catch (Throwable e) {
               log.severe(logId+": Internal error when removing expired message " + entry.getLogId() + " from queue, no recovery implemented, we continue: " + e.toString());
            }
            continue;
         }
         result.add(entry.clone()); // expired messages are sent as well
      }
      return result;
   }
View Full Code Here

    * Enforced by I_PostSendListener
    * @param msgQueueEntry, includes the returned QoS (e.g. PublisReturnQos)
    */
   public final void postSend(MsgQueueEntry[] entries) {
      for (int i=0; i<entries.length; i++) {
         MsgQueueEntry msgQueueEntry = entries[i];
         if (msgQueueEntry.getMethodName() == MethodName.CONNECT) {
            this.connectReturnQos = (ConnectReturnQos)msgQueueEntry.getReturnObj();
            if (this.connectReturnQos != null) {
               setContextNodeId(this.connectReturnQos.getServerInstanceId());
               // break; Loop to the latest if any
            }
            else {
               //log.warning("Expected connectReturnQos for " + msgQueueEntry.toXml() + " " + Global.getStackTraceAsString(null));
               if (log.isLoggable(Level.FINE)) log.fine("Expected connectReturnQos for " + msgQueueEntry.toXml() + " " + Global.getStackTraceAsString(null));
            }
         }
      }
      I_PostSendListener l = this.postSendListener;
      if (l != null) {
View Full Code Here

      }
      if (this.connectInProgress) {
         dispatchManager.trySyncMode(true);
         if (this.clientQueue != null && this.clientQueue.getNumOfEntries() > 0) {
            try {
               MsgQueueEntry entry = (MsgQueueEntry)this.clientQueue.peek();
               if (entry.getMethodName() == MethodName.CONNECT) {
                  this.clientQueue.remove();
                  log.info(getLogId()+"Removed queued connect message, our new connect has precedence");
               }
            }
            catch (XmlBlasterException e) {
View Full Code Here

         if (list.size() == 0)
            return new String[] { "Peeking messages from client queue failed, the reason is not known" };

         ArrayList tmpList = new ArrayList();
         for (int i=0; i<list.size(); i++) {
            MsgQueueEntry entry = (MsgQueueEntry)list.get(i);
            if (entry instanceof MsgQueuePublishEntry) {
               MsgQueuePublishEntry pe = (MsgQueuePublishEntry)entry;
               tmpList.add("  "+pe.getMsgUnit().getKeyData().toXml());
               tmpList.add("  "+pe.getMsgUnit().getContentStr());
               tmpList.add("  "+pe.getMsgUnit().getQosData().toXml());
            }
            else if (entry instanceof MsgQueueConnectEntry) {
              MsgQueueConnectEntry pe = (MsgQueueConnectEntry)entry;
                tmpList.add("  "+pe.getConnectQosData().toXml());
            }
            else if (entry instanceof MsgQueueDisconnectEntry) {
              MsgQueueDisconnectEntry pe = (MsgQueueDisconnectEntry)entry;
                tmpList.add("  "+pe.getDisconnectQos().toXml());
            }
            else if (entry instanceof MsgQueueEraseEntry) {
              MsgQueueEraseEntry pe = (MsgQueueEraseEntry)entry;
                tmpList.add("  "+pe.getEraseKey().toXml());
                tmpList.add("  "+pe.getEraseQos().toXml());
            }
            else if (entry instanceof MsgQueueGetEntry) {
              MsgQueueGetEntry pe = (MsgQueueGetEntry)entry;
                tmpList.add("  "+pe.getGetKey().toXml());
                tmpList.add("  "+pe.getGetQos().toXml());
            }
            else if (entry instanceof MsgQueueSubscribeEntry) {
              MsgQueueSubscribeEntry pe = (MsgQueueSubscribeEntry)entry;
                tmpList.add("  "+pe.getSubscribeKeyData().toXml());
                tmpList.add("  "+pe.getSubscribeQosData().toXml());
            }
            else if (entry instanceof MsgQueueUnSubscribeEntry) {
              MsgQueueUnSubscribeEntry pe = (MsgQueueUnSubscribeEntry)entry;
                tmpList.add("  "+pe.getUnSubscribeKey().toXml());
                tmpList.add("  "+pe.getUnSubscribeQos().toXml());
            }
            else {
               tmpList.add("Unsupported message queue entry '" + entry.getClass().getName() + "'");
            }
         }

         return (String[])tmpList.toArray(new String[tmpList.size()]);
      }
View Full Code Here

         if (log.isLoggable(Level.FINE)) log.fine("Publishing " + entries.length + " volatile dead messages");
         String[] retArr = new String[entries.length];
         PublishQos pubQos = new PublishQos(glob);
         pubQos.setVolatile(true);
         for (int ii=0; ii<entries.length; ii++) {
            MsgQueueEntry entry = entries[ii];
            if (entry == null) {
               log.severe("Didn't expect null element in MsgQueueEntry[], ignoring it");
               continue;
            }
            MsgUnit origMsgUnit = null;
            if (entry instanceof ReferenceEntry) {
               ReferenceEntry referenceEntry = (ReferenceEntry)entry;
               origMsgUnit = ((ReferenceEntry)entry).getMsgUnitOrNull();
               if (origMsgUnit == null) {
                  if (log.isLoggable(Level.FINE)) log.fine("Ignoring dead message for destroyed callback queue entry " + referenceEntry.getLogId());
                  continue;
               }
            }
            else {
               log.severe("PANIC: Internal error in deadMessage data type");
               retArr[ii] = "PANIC";
               continue;
            }
            // entry.getLogId()="callback:/node/heron/client/Subscriber/1/NORM/1196854278910000000/Hello"
            String clientPropertyKey = "__isErrorHandled" + entry.getLogId();
            String text = "Generating dead message '" + entry.getLogId() + "'" +
                         " from publisher=" + entry.getSender() +
                         " because delivery " +            // entry.getReceiver() is recognized in queueId
                         ((queue == null) ? "" : "with queue '"+queue.getStorageId().toString()+"' ") + "failed" +
                         ((reason != null) ? (": " + reason) : "");
            log.warning(text);
            retArr[ii] = publishDeadMessage(origMsgUnit, text, clientPropertyKey, entry.getReceiver());
         }
         return retArr;
      }
      catch (Throwable e) {
         log.severe("PANIC: " + entries.length + " dead letters are lost, no recovery possible:" + e.getMessage());
         for (int ii=0; ii<entries.length; ii++) {
            MsgQueueEntry entry = entries[ii];
            try {
               if (entry == null) {
                  continue;
               }
               /*
               else if (entry instanceof MsgUnitWrapper) {
                  MsgUnitWrapper msgUnitWrapper = (MsgUnitWrapper)entry;
                  String fileName = glob.getMsgFileDumper().store(msgUnitWrapper);
                  log.warn(ME, "Dumped lost message to file " + fileName);
               }
               */
               else if (entry instanceof MsgQueueHistoryEntry) {
                  log.warning("History entry is lost: " + entry.toXml());
               }
               else if (entry instanceof MsgQueueUpdateEntry) {
                  ReferenceEntry referenceEntry = (ReferenceEntry)entry;
                  if (referenceEntry.isDestroyed()) {
                     if (log.isLoggable(Level.FINE)) log.fine("Ignoring detroyed callback message " + entry.getLogId());
                  }
                  else {
                     log.warning("Callback of message failed unrecoverably: " + entry.toXml());
                  }
               }
               else {
                  log.severe("PANIC: Unrecoverable lost message " + entry.toXml());
               }
            }
            catch (Throwable th) {
               log.severe("PANIC: Unrecoverable lost message " + entry.toXml() + ": " + th.getMessage());
            }
         }
      }

      return new String[0];
View Full Code Here

TOP

Related Classes of org.xmlBlaster.util.queuemsg.MsgQueueEntry

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.