Examples of JVMMailboxPathLocker


Examples of org.apache.james.mailbox.store.JVMMailboxPathLocker

    private StoreMailboxManager<Integer> mailboxManager;
   
    @Before
    public void setUp() throws MailboxException {
        MaildirStore store = new MaildirStore(MAILDIR_HOME + "/%user", new JVMMailboxPathLocker());

        MaildirMailboxSessionMapperFactory mf = new MaildirMailboxSessionMapperFactory(store);
        mailboxManager = new StoreMailboxManager<Integer>(mf, null, new JVMMailboxPathLocker());
        mailboxManager.init();

    }
View Full Code Here

Examples of org.apache.james.mailbox.store.JVMMailboxPathLocker

        if (OsDetector.isWindows()) {
            System.out.println("Maildir tests work only on non-windows systems. So skip the test");
        } else {

            MaildirStore store = new MaildirStore(MAILDIR_HOME + "/%domain/%user", new JVMMailboxPathLocker());
            MaildirMailboxSessionMapperFactory mf = new MaildirMailboxSessionMapperFactory(store);
            StoreMailboxManager<Integer> manager = new StoreMailboxManager<Integer>(mf, null, new JVMMailboxPathLocker());
   
            manager.init();
   
            String user = "test@localhost";
            MailboxSession session = manager.createSystemSession(user, LoggerFactory.getLogger("Test"));
View Full Code Here

Examples of org.apache.james.mailbox.store.JVMMailboxPathLocker

     * @param maildirStoreConfiguration
     * @throws MailboxException
     * @throws UnsupportedEncodingException
     */
    private void doTestListWithMaildirStoreConfiguration(String maildirStoreConfiguration) throws MailboxException, UnsupportedEncodingException {
        MaildirStore store = new MaildirStore(MAILDIR_HOME + maildirStoreConfiguration, new JVMMailboxPathLocker());
        MaildirMailboxSessionMapperFactory mf = new MaildirMailboxSessionMapperFactory(store);
        StoreMailboxManager<Integer> manager = new StoreMailboxManager<Integer>(mf, null, new JVMMailboxPathLocker());
        manager.init();
        setMailboxManager(manager);
        try {
            super.testList();
        } finally {
View Full Code Here

Examples of org.apache.james.mailbox.store.JVMMailboxPathLocker

public class MaildirSubscriptionManagerTest extends AbstractSubscriptionManagerTest{

    @Override
    public SubscriptionManager createSubscriptionManager() {
        MaildirStore store = new MaildirStore("target/Maildir/%domain/%user", new JVMMailboxPathLocker());
        MaildirMailboxSessionMapperFactory factory = new MaildirMailboxSessionMapperFactory(store);
        StoreSubscriptionManager sm = new StoreSubscriptionManager(factory);
        return sm;
    }
View Full Code Here

Examples of org.apache.james.mailbox.store.JVMMailboxPathLocker

        this.maildirLocation = maildirLocation;
        this.locker = locker;
    }
   
    public MaildirStore(String maildirLocation) {
        this(maildirLocation, new JVMMailboxPathLocker());
    }
View Full Code Here

Examples of org.apache.james.mailbox.store.JVMMailboxPathLocker

                JPAProperty.class.getName() + ";" +
                JPAUserFlag.class.getName() + ";" +
                JPASubscription.class.getName() + ")");
      
        entityManagerFactory = OpenJPAPersistence.getEntityManagerFactory(properties);
        JVMMailboxPathLocker locker = new JVMMailboxPathLocker();
        JPAMailboxSessionMapperFactory mf = new JPAMailboxSessionMapperFactory(entityManagerFactory, new JPAUidProvider(locker, entityManagerFactory), new JPAModSeqProvider(locker, entityManagerFactory));

        JPAMailboxManager mailboxManager = new OpenJPAMailboxManager(mf, null);
        mailboxManager.init();
View Full Code Here

Examples of org.apache.james.mailbox.store.JVMMailboxPathLocker

                JPAUserFlag.class.getName() + ";" +
                JPASubscription.class.getName() + ")");
        properties.put("openjpa.LockTimeout", locktimeout + "");
      
        entityManagerFactory = OpenJPAPersistence.getEntityManagerFactory(properties);
        JVMMailboxPathLocker locker = new JVMMailboxPathLocker();
        JPAMailboxSessionMapperFactory mf = new JPAMailboxSessionMapperFactory(entityManagerFactory, new JPAUidProvider(locker, entityManagerFactory), new JPAModSeqProvider(locker, entityManagerFactory));

        mailboxManager = new OpenJPAMailboxManager(mf, null);
        mailboxManager.init();
View Full Code Here

Examples of org.apache.james.mailbox.store.JVMMailboxPathLocker

        entityManagerFactory = OpenJPAPersistence.getEntityManagerFactory(properties);
    }
   
    @Override
    public SubscriptionManager createSubscriptionManager() {
        JVMMailboxPathLocker locker = new JVMMailboxPathLocker();

        JPAMailboxSessionMapperFactory mf = new JPAMailboxSessionMapperFactory(entityManagerFactory, new JPAUidProvider(locker, entityManagerFactory), new JPAModSeqProvider(locker, entityManagerFactory));

        JPASubscriptionManager sm = new JPASubscriptionManager(mf);
       
View Full Code Here

Examples of org.apache.james.mailbox.store.JVMMailboxPathLocker

        repository = RepositoryImpl.create(config);

        // Register imap cnd file
        JCRUtils.registerCnd(repository, workspace, user, pass);
        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);
        mailboxManager = new JCRMailboxManager(mf, null, locker);
        mailboxManager.init();
View Full Code Here

Examples of org.apache.james.mailbox.store.JVMMailboxPathLocker

        super(mapperFactory, authenticator,  locker);
        this.useStreaming = useStreaming;
    }

    public OpenJPAMailboxManager(JPAMailboxSessionMapperFactory mapperFactory, Authenticator authenticator) {
        this(mapperFactory, authenticator, new JVMMailboxPathLocker(), false);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.