[jboss-cvs] jboss-seam/doc/reference/en/modules ...
Peter Muir
peter at bleepbleep.org.uk
Sun Feb 11 17:41:21 EST 2007
User: pmuir
Date: 07/02/11 17:41:21
Modified: doc/reference/en/modules mail.xml
Log:
Doc MailListener
Revision Changes Path
1.14 +35 -1 jboss-seam/doc/reference/en/modules/mail.xml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: mail.xml
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/doc/reference/en/modules/mail.xml,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- mail.xml 11 Feb 2007 00:00:11 -0000 1.13
+++ mail.xml 11 Feb 2007 22:41:21 -0000 1.14
@@ -166,6 +166,40 @@
</section>
</section>
+<!-- <section>
+ <title>Receiving emails</title>
+ <para>If you are using EJB then you can use a MDB (Message Driven Bean) to receive email. JBoss AS comes with <literal>mail-ra.rar</literal> :</para>
+ <programlisting>@MessageDriven(activationConfig={
+ @ActivationConfigProperty(propertyName="mailServer", propertyValue="localhost"),
+ @ActivationConfigProperty(propertyName="mailFolder", propertyValue="INBOX"),
+ @ActivationConfigProperty(propertyName="storeProtocol", propertyValue="pop3"),
+ @ActivationConfigProperty(propertyName="userName", propertyValue="seam"),
+ @ActivationConfigProperty(propertyName="password", propertyValue="seam")
+})
+ at ResourceAdapter("mail-ra.rar")
+ at Name("mailListener")
+public class MailListenerMDB implements MailListener {
+
+ @In(create=true)
+ private OrderProcessor orderProcessor;
+
+ public void onMessage(Message message) {
+ // Process the message
+ orderProcessor.process(message.getSubject());
+ }
+
+}</programlisting>
+
+ <para>Each message received will cause <literal>onMessage(Message message)</literal> to be called. Most seam
+ annotations will work inside a MDB but you musn't access the persistence context.</para>
+
+ <para>You can find more information on <literal>mail-ra.rar</literal> at
+ <ulink url="hhttp://wiki.jboss.org/wiki/Wiki.jsp?page=InboundJavaMail">http://wiki.jboss.org/wiki/Wiki.jsp?page=InboundJavaMail</ulink>.</para>
+
+ <para>If you aren't using JBoss AS you can still use <literal>mail-ra.rar</literal> (included with Seam in the mail directory),
+ or you may find your application server includes a similar adapter.</para>
+
+ </section>-->
<section>
<title>Configuration</title>
More information about the jboss-cvs-commits
mailing list