Package ariba.appcore

Examples of ariba.appcore.Global


        }
        int count = messages.length;
        int start = Math.max(0, count-atMost);

        // we persist the ID of the last message that we processed
        Global proceededRecord = Global.findOrCreate(_LastProcessedKey);
        String lastId = proceededRecord.getStringValue();
        if (lastId != null) {
            // backup until we hit our id (or the start
            for (int i=count-1; i >=start; i--) {
                if (getMessageID(messages[i]).equals(lastId)) {
                    start = i + 1;
                    break;
                }
            }
        }

        // process backlog
        for (int i=start; i < count; i++) {
            MimeMessage message = (MimeMessage)messages[i];
            proceededRecord.setStringValue(getMessageID(message));
            ObjectContext.get().save();
            handler.process(message);
        }

      processIncomingMessages(_inbox, handler, proceededRecord);
View Full Code Here

TOP

Related Classes of ariba.appcore.Global

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.