users@glassfish.java.net

Re: RFH: automated mail processing?

From: <glassfish_at_javadesktop.org>
Date: Wed, 09 Jan 2008 18:36:15 PST

This is actually an interesting little bit of kit.

In theory, there's no reason it needs to be in JEE 5, since it runs against JCA 1.5, and that's still the spec for JEE 5. So this should Just Work.

But I looked at it, and it basically polls a mailbox via JavaMail.

Depending on your environment, this doesn't seem to me to be that bad of a solution. I guess it really depends on what kind of mail traffic you expect to get.

But from a configuration and setup POV, it seems pretty straightforward and dead simple. You point it at a mail box, it polls the mail box, and flags each message that it feeds in to the MDB.

That seems to me to be lower impact than something like James, which is effectively a Java mail server. Nothing wrong with that, but configuring and maintaining a mail server vs talking to a mailbox seem to be a night and day issue to me.

Mail servers are proven kit on top of a cantankerous protocol in a hostile world. Mailboxes can be all nice and despammified for you etc. (they also work cross platform as you talk POP or IMAP to Unix boxen, exchange, yahoo, whatever.)

Now, sure, if you're pulling LOTS of mail, then something like tapping the SMTP feed directly may well be a better solution. But if not, polling a mailbox every 5 seconds seems pretty low impact and responsive enough for most anyone.

The other advantage is that your email isn't dependent on the JEE server running anyway. If your JEE server is being redeployed, there's no one to receive the JMS message. If the JMS queue is in your JEE server (like many), it won't be listening either perhaps. I dunno, it's just me, but email servers are a proven technology that I know enough about to not bother messing with save for special needs, and the mailbox interface (assuming it works reliably) seems like a good solid solution.

I've been having this nagging need for it in the background for some time, and I may give this connector a try.
[Message sent by forum member 'whartung' (whartung)]

http://forums.java.net/jive/thread.jspa?messageID=253103