try {
Session s = repository.login(session);
Node node = s.getNodeByIdentifier(mailbox.getMailboxId());
return node.getProperty(JCRMailbox.HIGHESTMODSEQ_PROPERTY).getLong();
} catch (RepositoryException e) {
throw new MailboxException("Unable to get highest mod-sequence for mailbox " + mailbox, e);
}
}