JPAMailboxSessionMapperFactory mf = new JPAMailboxSessionMapperFactory(entityManagerFactory, new JPAUidProvider(locker, entityManagerFactory), new JPAModSeqProvider(locker, entityManagerFactory));
MailboxACLResolver aclResolver = new UnionMailboxACLResolver();
GroupMembershipResolver groupMembershipResolver = new SimpleGroupMembershipResolver();
mailboxManager = new OpenJPAMailboxManager(mf, null, aclResolver, groupMembershipResolver);
mailboxManager.init();
// Set the lock timeout via SQL because of a bug in openJPA
// https://issues.apache.org/jira/browse/OPENJPA-1656
setH2LockTimeout();