[jboss-user] [JBoss Seam] - Re: Seam mailer component
petemuir
do-not-reply at jboss.com
Tue Jul 18 14:26:29 EDT 2006
Ok, so I do perhaps need to receive email ;-) and faxes, and SMS, and...
| * I started looking at MDB and JCA message inflow, looks like a good way to do it. My initial idea would be to have a listener interface
|
| public interface EmailListener {
| | public void receive(javax.mail.Message message);
| | }
|
| which must be implemeneted by the MDB receiving email. Then write a resource adaptor to receive new messages from the emailbox and deliver them.
|
| * The resource adaptor would need to poll the mail box every x seconds to check for new email.
|
| * Might want to set user, host, password at runtime. But what I'm suggesting seems to require it at deploy time.
|
| * Doesn't seem to be very Seam like. A thought is to tie it to component driven events which could solve other problems (I need to think about this)
|
| * Would be a good way to send email as well i.e.
|
| @In private Mailer mailer
| | ...
| | javax.mail.Message message = ...;
| | mailer.send(message);
| | ...
| |
|
| The Mailer component could then add in any defaults specified if not set on the message.
|
Comments, thoughts, ideas welcome (please!)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958919#3958919
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958919
More information about the jboss-user
mailing list