I've been working on adding an IMAP implementation to the Geronimo javamail implementation and need an opinion on how to approach compatibility with the Sun IMAP implementation.

The Sun version of IMAP includes a number of extensions that are above and beyond what's defined by the javamail API. For example, the IMAPFolder class provides a QUOTA and ACL extensions. To take advantage of these methods, you must cast the Folder instance to a com.sun.mail.imap.IMAPFolder instance. Details are documented here:

http://java.sun.com/products/javamail/javadocs/com/sun/mail/imap/IMAPFolder.html

The ACL extensions also require the use of additional classes that are part of the com.sun.mail.imap package. For example, com.sun.mail.imap.Rights. These extensions are all labeled as "experimental" and "use at your own risk, they may change". Adding these extensions should be no big deal, although the same extensions implemented for Geronimo will not be compatible with the Sun version because we won't be using the com.sun.mail.imap package for any of the class names. So, how far should we be going to be compatible with the Sun implementation? Should the Geronimo implementation stick to just what's defined in the API, or should we implement all of the what Sun has implemented, even though we can't be 100% compatible because of the package name diferences? I don't have strong feelings either way. The amount of code involved to implement these additional features is not large, so I'm willing to go either way. Do we have any precedents for something like this, or are we entering new territory?

Rick

Reply via email to