Having removed the CRLFOutputStream depedendency the only class having real dependencies on SUN's javamail *implementation* (com.sun classes) is the RemoteDelivery mailet.

Geronimo's implementation provides almost identical classes but of course they are in their own package.

IMO it woul be cool to support geronimo's javamail as like sun's javamail (we are ASF brothers :-) ), what can we do?

Change RemoteDelivery to check instanceof of both classes (and add geronimo implementation to the build time depedencies)

Add a GeronimoRemoteDelivery identical to the RemoteDelivery but renaming packages (same geronimo build time depedency).

Use reflection to invoke the methods we use so that we can support both implementation with no build time dependencies.

We currently call transport.supportsExtension("8BITMIME") method once per mail and SMTPAddressFailedException, SMTPAddressSucceededException and SMTPSendFailedException mainly for better bounce handling/debugging/logging purpose upon exception.

So we would have 1 reflection for each delivery attempt + possibly 3-4 reflections for each address failed upon delivery failure.

I would go with reflections.

Objections? Opinions?

Stefano


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to