james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Bagnara <apa...@bago.org>
Subject Re: RemoteDelivery vs sun and geronimo javamail implementation
Date Sat, 21 Jun 2008 14:46:54 GMT
Robert Burrell Donkin ha scritto:
> On Sat, Jun 21, 2008 at 2:29 PM, Stefano Bagnara <apache@bago.org> wrote:
>> The issue is that we use activation/javamail to connect to an smtp url.
>> javamail give us a Transport (an interface defined in the specification).
>> In order to better catch errors and to support 8bitmime correctly we have to
>> deal with implementation details.
> ok
>> In the case of Sun's implementation we check for "instance of
>> com.sun.mail.smtp.SMTPTransport" while using geronimo we would need to check
>> for "org.apache.geronimo.javamail.transport.smtp.SMTPTransport".
>> The same applies to the 3 specific exceptions we receive: they all are
>> extensions of javax.mail.SendFailedException, but casting them to their real
>> class we get more accurate error reporting.
>> How can we factor this in a separate library?
>> To do that we would need to specify our own protocol provider
>> (javamail.default.providers) wrapping to the right implementation, but this
>> does not make sense to me.
>> Furthermore I don't think we can create extensions for the 2 implementation
>> to implement a new interface, because the classes are created by javamail
>> and not by us.
> yes: this is a JavaMail bug
> i see now that the API has been badly designed and users are forced to
> cast to sun specific class to obtain information that should be
> available through the public interface

This is always because javamail has been internded for MUA. The track 
detailed delivery errors via callback interfaces and they don't need the 
8BITMIME stuff (this is mainly an MTA feature).

> but does remote delivery really need to use javamail as it's SMTP client?

no. 1 year ago I wrote a MINA based deliverer, but I never had the time 
to complete and test it. A similar change instead would require deep 
testing, so in the mean time I think it would be good to fix the 
hardcoded sun javamail dependency with something supporting both sun's 
and geronimo implementations.


To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org

View raw message