Examples of MailQueueException


Examples of org.apache.james.queue.api.MailQueue.MailQueueException

                } catch (JMSException e1) {
                    // ignore on rollback
                }
            }
        } catch (JMSException ex) {
            throw new MailQueueException("Unable to commit dequeue operation for mail " + mail.getName(), ex);
        } finally {
            if (consumer != null) {

                try {
                    consumer.close();
View Full Code Here

Examples of org.apache.james.queue.api.MailQueue.MailQueueException

    }
   
    public MailQueueItem deQueue() throws MailQueueException {
        if (throwException) {
            throwException = false;
            throw new MailQueueException("Mock");
        }
        try {
          final Mail mail = queue.take();
            return new MailQueueItem() {
       
        public Mail getMail() {
          return mail;
        }
       
        public void done(boolean success) throws MailQueueException {
          // do nothing here
         
        }
      };
        } catch (InterruptedException e) {
            throw new MailQueueException("Mock",e);
        }
    }
View Full Code Here

Examples of org.apache.james.queue.api.MailQueue.MailQueueException

    }

    public void enQueue(final Mail mail, long delay, TimeUnit unit) throws MailQueueException {
        if (throwException) {
            throwException = false;
            throw new MailQueueException("Mock");
        }       
        scheduler.schedule(new Runnable() {

            public void run() {
                try {
View Full Code Here

Examples of org.apache.james.queue.api.MailQueue.MailQueueException

    }

    public void enQueue(Mail mail) throws MailQueueException {
        if (throwException) {
            throwException = false;
            throw new MailQueueException("Mock");
        }
        try {
            queue.put(mail);
        } catch (InterruptedException e) {
            throw new MailQueueException("Mock",e);
        }
    }
View Full Code Here

Examples of org.apache.james.queue.api.MailQueue.MailQueueException

                        // something else in the server was abusing memory, we would
                        // not want to start purging the retrying spool!
                        LifecycleUtil.dispose(mail);
                        //workRepository.remove(key);
                        queueItem.done(false);
                        throw new MailQueueException("Unable to perform dequeue", e);
                    }
                   
                  
                } catch (Throwable e) {
                    if (!destroyed) {
View Full Code Here

Examples of org.apache.james.queue.api.MailQueue.MailQueueException

                } catch (JMSException e1) {
                    // ignore on rollback
                }
            }
        } catch (JMSException ex) {
            throw new MailQueueException("Unable to commit dequeue operation for mail " + mail.getName(), ex);
        } finally {
            if (consumer != null) {

                try {
                    consumer.close();
View Full Code Here

Examples of org.apache.james.queue.api.MailQueue.MailQueueException

                        // not want to start purging the retrying spool!
                        log("Exception caught in RemoteDelivery.run()", e);
                        LifecycleUtil.dispose(mail);
                        // workRepository.remove(key);
                        queueItem.done(false);
                        throw new MailQueueException("Unable to perform dequeue", e);
                    }

                } catch (Throwable e) {
                    if (!destroyed) {
                        log("Exception caught in RemoteDelivery.run()", e);
View Full Code Here

Examples of org.apache.james.queue.api.MailQueue.MailQueueException

                } catch (JMSException e1) {
                    // ignore on rollback
                }
            }
        } catch (JMSException ex) {
            throw new MailQueueException("Unable to commit dequeue operation for mail " + mail.getName(), ex);
        } finally {
            if (consumer != null) {

                try {
                    consumer.close();
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.