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 2009/03/30 14:02:05 UTC
svn commit: r759933 - in /camel/branches/camel-1.x: ./
components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java
components/camel-xmpp/src/test/resources/
Author: davsclaus
Date: Mon Mar 30 12:02:04 2009
New Revision: 759933
URL: http://svn.apache.org/viewvc?rev=759933&view=rev
Log:
Merged revisions 759931 via svnmerge from
https://svn.apache.org/repos/asf/camel/trunk
........
r759931 | davsclaus | 2009-03-30 13:58:02 +0200 (Mon, 30 Mar 2009) | 1 line
MR-157: Better re connect if not connected to mail store, eg catching exception that some mail server throws despite the API should just return a boolean.
........
Modified:
camel/branches/camel-1.x/ (props changed)
camel/branches/camel-1.x/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java
camel/branches/camel-1.x/components/camel-xmpp/src/test/resources/ (props changed)
Propchange: camel/branches/camel-1.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Mar 30 12:02:04 2009
@@ -1 +1 @@
-/camel/trunk:736980,739733,739904,740251,740295,740306,740596,740663,741848,742231,742705,742739,742854,742856,742898,742906,743613,743762,743773,743920,743959-743960,744123,745105,745367,745541,745751,745826,745978,746269,746872,746895,746962,747258,747678-747704,748392,748436,748821,749563-749564,749574,749628-749629,749936,749956,750017,750334,750396,750761,750796,752068,752117,752418,752751-752755,752764-752773,752956,753087,753101,753175,755136,755487,756313,756348,756870,756939,757636,757693,757743,757865,758539,758563,758600,758617,758692,758990,759362,759453,759887
+/camel/trunk:736980,739733,739904,740251,740295,740306,740596,740663,741848,742231,742705,742739,742854,742856,742898,742906,743613,743762,743773,743920,743959-743960,744123,745105,745367,745541,745751,745826,745978,746269,746872,746895,746962,747258,747678-747704,748392,748436,748821,749563-749564,749574,749628-749629,749936,749956,750017,750334,750396,750761,750796,752068,752117,752418,752751-752755,752764-752773,752956,753087,753101,753175,755136,755487,756313,756348,756870,756939,757636,757693,757743,757865,758539,758563,758600,758617,758692,758990,759362,759453,759887,759931
Propchange: camel/branches/camel-1.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: camel/branches/camel-1.x/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java?rev=759933&r1=759932&r2=759933&view=diff
==============================================================================
--- camel/branches/camel-1.x/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java (original)
+++ camel/branches/camel-1.x/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java Mon Mar 30 12:02:04 2009
@@ -125,11 +125,22 @@
protected void ensureIsConnected() throws MessagingException {
MailConfiguration config = endpoint.getConfiguration();
- if (store == null || !store.isConnected()) {
- store = sender.getSession().getStore(config.getProtocol());
+ boolean connected = false;
+ try {
+ if (store != null && store.isConnected()) {
+ connected = true;
+ }
+ } catch (Exception e) {
+ LOG.debug("Exception while testing for is connected to MailStore: "
+ + endpoint.getConfiguration().getMailStoreLogInformation()
+ + ". Caused by: " + e.getMessage(), e);
+ }
+
+ if (!connected) {
if (LOG.isDebugEnabled()) {
- LOG.debug("Connecting to MailStore " + endpoint.getConfiguration().getMailStoreLogInformation());
+ LOG.debug("Connecting to MailStore: " + endpoint.getConfiguration().getMailStoreLogInformation());
}
+ store = sender.getSession().getStore(config.getProtocol());
store.connect(config.getHost(), config.getPort(), config.getUsername(), config.getPassword());
}
Propchange: camel/branches/camel-1.x/components/camel-xmpp/src/test/resources/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Mar 30 12:02:04 2009
@@ -1 +1 @@
-/camel/trunk/components/camel-xmpp/src/test/resources:757693,757743,757865,758539,758563,758617,758692,758990,759362,759887
+/camel/trunk/components/camel-xmpp/src/test/resources:757693,757743,757865,758539,758563,758617,758692,758990,759362,759887,759931