private boolean nextIterator() { while (ci.hasNext()) { String chanellId = (String) ci.next(); try { mc = messageService.getChannel(messageService .channelReference(context, chanellId)); messageCount = mc.getCount(); if (messageCount > 0 ) { nextMessage = 1; // Pager starts at 1 return true; } } catch (Exception ex) { ex.printStackTrace(); log.warn("Failed to get channel " + chanellId); //$NON-NLS-1$ } } mc = null; nextMessage = -1; messageCount = -1; return false; }