Fix RecoveryBrokerTest that I messed up :)

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@491452 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2006-12-31 17:32:40 +00:00
parent b91103a830
commit a810f4300a
1 changed files with 11 additions and 2 deletions

View File

@ -48,7 +48,7 @@ class TopicStorePrefetch extends AbstractPendingMessageCursor implements
private String subscriberName; private String subscriberName;
private Destination regionDestination; private Destination regionDestination;
boolean empty=true; boolean empty;
private MessageId firstMessageId; private MessageId firstMessageId;
private MessageId lastMessageId; private MessageId lastMessageId;
@ -65,7 +65,16 @@ class TopicStorePrefetch extends AbstractPendingMessageCursor implements
this.subscriberName=subscriberName; this.subscriberName=subscriberName;
} }
public void start() throws Exception{ public void start() throws Exception {
if(batchList.isEmpty()){
try{
fillBatch();
}catch(Exception e){
log.error("Failed to fill batch",e);
throw new RuntimeException(e);
}
empty = batchList.isEmpty();
}
} }
public void stop() throws Exception{ public void stop() throws Exception{