activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marlet <...@freenet.de>
Subject Re: REST problem
Date Mon, 29 Oct 2007 10:50:03 GMT

Ok, I compiled the source code with following change in the two
doMessages(..) methods, and now it seems to be working:
                    ...
                    // send a response for each available message (up to max
                    // messages)
                    while ((maxMessages < 0 || messages < maxMessages) &&
message != null) {
                        //
System.err.println("message["+messages+"]="+message);
                        if (ajax) {
                            writer.print("<response type='object' id='");
                            writer.print(request.getParameter("id"));
                            writer.println("'>");
                        } else {
                            // only ever 1 message for non ajax!
                            setResponseHeaders(response, message);
                        }

                        writeMessageResponse(writer, message);

                        if (ajax) {
                            writer.println("</response>");
                            
                            // look for next message
                            message = consumer.receiveNoWait();
                        }

                       
                        messages++;
                    }
                    ...


-- 
View this message in context: http://www.nabble.com/REST-problem-tf4707322s2354.html#a13464922
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Mime
View raw message