Object admin = getMailboxAdmin(mb);
DestroyAdmin dAdmin = (DestroyAdmin)admin;
int i = 0;
// Register and check lease
MailboxPullRegistration mr = getPullRegistration(mb, DURATION1);
Lease mrl = getPullMailboxLease(mr);
checkLease(mrl, DURATION1);
// Start event generator thread with a delay of MAX_WAIT_SEND_EVENT
Thread t =
new Thread(
new MyDestroyerRunnable(
dAdmin, logger, MAX_WAIT_SEND_DESTROY ));
t.start();
// Get events and verify
logger.log(Level.INFO, "Getting events from empty mailbox.");
RemoteEventIterator rei = mr.getRemoteEvents();
RemoteEvent rei_event = null;
Date before = new Date();
logger.log(Level.INFO, "Calling next() on empty set @ {0}", before);
try {
rei_event = rei.next(MAX_WAIT_GET_EVENT);