78 |
if (start > 0) |
if (start > 0) |
79 |
count = Math.min(10, commentsCb.getEntryCount() ); |
count = Math.min(10, commentsCb.getEntryCount() ); |
80 |
|
|
81 |
//log.warning("count=" + count + " start=" + start ); |
//log.warning("count=" + count + " start=" + start + " entryCount=" + commentsCb.getEntryCount() ); |
82 |
CommentsRequest commentsRequest = CommentsRequest.newBuilder() |
CommentsRequest commentsRequest = CommentsRequest.newBuilder() |
83 |
.setAppId(appId) |
.setAppId(appId) |
84 |
.setStartIndex(start) |
.setStartIndex(start) |
89 |
session.flush(); |
session.flush(); |
90 |
start +=10; |
start +=10; |
91 |
|
|
92 |
if (start >= 50) |
if (start >= 200) |
93 |
break; //emergency brake |
break; //emergency brake |
94 |
|
|
95 |
} while ( start < commentsCb.getEntryCount() ); |
} while ( start < commentsCb.getEntryCount() ); |
149 |
|
|
150 |
response.setContentType("text/html"); |
response.setContentType("text/html"); |
151 |
PrintWriter out = response.getWriter(); |
PrintWriter out = response.getWriter(); |
152 |
out.print( "<html><body><pre>" + doLookup(query) + "</pre></body></html>" ); |
out.print( "<html><body><pre>" + doLookupWorker(query) + "</pre></body></html>" ); |
153 |
} |
} |
154 |
|
|
155 |
} |
} |