public void run()

in chatterbox-imap/chatterbox-imap-impl/src/main/java/org/apache/tomee/chatterbox/imap/adapter/ImapCheckThread.java [66:91]


    public void run() {
        while (!stopped.get()) {
            Store store = null;
            try {
                store = connect(session, resourceAdapter);
                processFolder(store, "inbox");
            } catch (MessagingException e) {
                LOGGER.log(Level.WARNING, String.format("Failed to Connect %s %s: %s",
                        resourceAdapter, e.getClass().getName(), e.getMessage()));
            } finally {
                if (store != null) {
                    try {
                        store.close();
                    } catch (Exception e) {
                        LOGGER.log(Level.WARNING, "Unable to close store" , e);
                    }
                }
            }

            try {
                Thread.sleep(5000);
            } catch (InterruptedException e) {
                // ignore
            }
        }
    }