MailboxSessionJCRRepository sessionRepos = new GlobalMailboxSessionJCRRepository(repository, workspace, user, pass);
JVMMailboxPathLocker locker = new JVMMailboxPathLocker();
JCRUidProvider uidProvider = new JCRUidProvider(locker, sessionRepos);
JCRModSeqProvider modSeqProvider = new JCRModSeqProvider(locker, sessionRepos);
JCRMailboxSessionMapperFactory mf = new JCRMailboxSessionMapperFactory(sessionRepos, uidProvider, modSeqProvider);
MailboxACLResolver aclResolver = new UnionMailboxACLResolver();
GroupMembershipResolver groupMembershipResolver = new SimpleGroupMembershipResolver();
mailboxManager = new JCRMailboxManager(mf, null, locker, aclResolver, groupMembershipResolver);
mailboxManager.init();
}