You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2008/05/08 07:07:06 UTC

svn commit: r654414 - in /activemq/camel/trunk/components/camel-mail/src: main/java/org/apache/camel/component/mail/ test/java/org/apache/camel/component/mail/

Author: davsclaus
Date: Wed May  7 22:07:06 2008
New Revision: 654414

URL: http://svn.apache.org/viewvc?rev=654414&view=rev
Log:
CAMEL-335
- Removed deprecated classes that is no longer used

Removed:
    activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/JavaMailConnection.java
    activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MessageHeaderAccessException.java
    activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MessageHeaderNamesAccessException.java
    activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/RuntimeMailException.java
    activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/InvalidConfigurationTest.java


Re: svn commit: r654414 - in /activemq/camel/trunk/components/camel-mail/src: main/java/org/apache/camel/component/mail/ test/java/org/apache/camel/component/mail/

Posted by James Strachan <ja...@gmail.com>.
2008/5/8 Claus Ibsen <ci...@silverbullet.dk>:
> No you must use pop3 or imaps to poll from the mailbox.
>
>
>  But the unit test is much harder to test since the logic to connect to the mailbox is now moved from doStart to the poll() to enable re-connect etc.
>
>  I should add some validation logic in the endpoint when an consumer is created to scan for smtp that is invalid. (Added on my ticket list now)

Great :)

>  So the exception is now caught by ScheduledPollConsumer (James isn't there something we could do better in Camel than just WARN log this?)
>
>
>     /**
>      * Invoked whenever we should be polled
>      */
>     public void run() {
>         LOG.debug("Starting to poll");
>         try {
>             poll();
>         } catch (Exception e) {
>             LOG.warn("Caught: " + e, e);
>         }
>     }

Yeah - thats sucky - am sure we can do better :)

I wonder if async exceptions should be kept in a list somewhere so
that any doStop() method fails and throw's the first exception found
or something?

-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com

RE: svn commit: r654414 - in /activemq/camel/trunk/components/camel-mail/src: main/java/org/apache/camel/component/mail/ test/java/org/apache/camel/component/mail/

Posted by Claus Ibsen <ci...@silverbullet.dk>.
No you must use pop3 or imaps to poll from the mailbox.


But the unit test is much harder to test since the logic to connect to the mailbox is now moved from doStart to the poll() to enable re-connect etc.

I should add some validation logic in the endpoint when an consumer is created to scan for smtp that is invalid. (Added on my ticket list now)


So the exception is now caught by ScheduledPollConsumer (James isn't there something we could do better in Camel than just WARN log this?)


    /**
     * Invoked whenever we should be polled
     */
    public void run() {
        LOG.debug("Starting to poll");
        try {
            poll();
        } catch (Exception e) {
            LOG.warn("Caught: " + e, e);
        }
    }



Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk
-----Original Message-----
From: James Strachan [mailto:james.strachan@gmail.com] 
Sent: 8. maj 2008 09:32
To: camel-dev@activemq.apache.org
Subject: Re: svn commit: r654414 - in /activemq/camel/trunk/components/camel-mail/src: main/java/org/apache/camel/component/mail/ test/java/org/apache/camel/component/mail/

No biggie - but is InvalidConfigurationTest now an invalid test? i.e.
you can consume from smtp?

2008/5/8  <da...@apache.org>:
> Author: davsclaus
>  Date: Wed May  7 22:07:06 2008
>  New Revision: 654414
>
>  URL: http://svn.apache.org/viewvc?rev=654414&view=rev
>  Log:
>  CAMEL-335
>  - Removed deprecated classes that is no longer used
>
>  Removed:
>     activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/JavaMailConnection.java
>     activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MessageHeaderAccessException.java
>     activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MessageHeaderNamesAccessException.java
>     activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/RuntimeMailException.java
>     activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/InvalidConfigurationTest.java
>
>



-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com

Re: svn commit: r654414 - in /activemq/camel/trunk/components/camel-mail/src: main/java/org/apache/camel/component/mail/ test/java/org/apache/camel/component/mail/

Posted by James Strachan <ja...@gmail.com>.
No biggie - but is InvalidConfigurationTest now an invalid test? i.e.
you can consume from smtp?

2008/5/8  <da...@apache.org>:
> Author: davsclaus
>  Date: Wed May  7 22:07:06 2008
>  New Revision: 654414
>
>  URL: http://svn.apache.org/viewvc?rev=654414&view=rev
>  Log:
>  CAMEL-335
>  - Removed deprecated classes that is no longer used
>
>  Removed:
>     activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/JavaMailConnection.java
>     activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MessageHeaderAccessException.java
>     activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MessageHeaderNamesAccessException.java
>     activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/RuntimeMailException.java
>     activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/InvalidConfigurationTest.java
>
>



-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com