0 Replies Latest reply on Sep 11, 2006 5:02 AM by burakbayramli

    MailListener MDB (EJB3)

      I am trying to EJB3'ify the MailListener MDB given by Scott Start based on the Wiki item below

      http://wiki.jboss.org/wiki/Wiki.jsp?page=InboundJavaMail

      I have deployed the code below to JBoss 4.0.4.GA. The MDB comes up, but it doesn't connect to the mailserver specified.

      @MessageDriven(activationConfig =
      {
       @ActivationConfigProperty(propertyName="messagingType",
       propertyValue="org.jboss.resource.adapter.mail.inflow.MailListener"),
       @ActivationConfigProperty(propertyName="mailServer",
       propertyValue="pop.gmail.com"),
       @ActivationConfigProperty(propertyName="mailFolder",
       propertyValue="Inbox"),
       @ActivationConfigProperty(propertyName="storeProtocol",
       propertyValue="imap"),
       @ActivationConfigProperty(propertyName="userName",
       propertyValue="****"),
       @ActivationConfigProperty(propertyName="password",
       propertyValue="***")
      
      })
      public class MailReaderMdb implements MailListener {
      
       @Resource MessageDrivenContext mdc;
      
       public void onMessage(javax.mail.Message message) {
       System.out.println(""+message);
       }
      
      }


      Also, mail-ra.rar was not part of 4.0.4.GA, which I copied from 4.0.1.zip installation. Not sure if this was the right thing to do.

      I was not sure what to do with stuff inside jboss.xml config either, with annotation style configuration are they still needed?

      I also get the message below;

      11:53:55,789 WARN [MDB] No message-driven-destination given; using; guessing ty
      pe
      11:53:55,799 WARN [MDB] Could not determine destination type, defaults to: java
      x.jms.Topic


      Thanks,