camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marco Zapletal (JIRA)" <>
Subject [jira] [Commented] (CAMEL-6464) connectionTimeout property is ignored by JavaMail
Date Thu, 20 Jun 2013 15:51:20 GMT


Marco Zapletal commented on CAMEL-6464:

The problem of this issue is that setting a long property on com.sun.mail.util.SocketFetcher::getSocket
has no effect. However, providing a good test for it is difficult, since the properties are
set on the socket on creation and I get no handle of the socket (through the Camel mail component)
after creation. 

I am happy to provide a patch, which I would "test" by debugging it before attaching it here.
Actually, there are two ways to patch it and both are quite simple: (i) changing the type
of connectionTimeout from long to int or (ii) downcast the long to an int before setting the
mail.<protocol>.timeout value. I would opt for (i) but this may break the API - so I
would appreciate your opinion on this before providing the patch.
> connectionTimeout property is ignored by JavaMail
> -------------------------------------------------
>                 Key: CAMEL-6464
>                 URL:
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-mail
>    Affects Versions: 2.10.2
>         Environment: mail-1.4.5.jar
>            Reporter: Marco Zapletal
> JavaMail ignores the timeout values set via the connectionTimeout property.
> - Within MailConfiguration::createJavaMailProperties the mail.<protocol>.timeout
and mail.<protocol>.connectionTimeout parameters are set as long values
> - In com.sun.mail.util.PropUtil::getInt (line 141) the property is ignored since it is
a long value
> Changing the type of connectionTimeout from long to int would be the cleanest solution
- another suggestion would be to downcast the connectionTimeout in MailConfiguration::createJavaMailProperties

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message