[jboss-user] [Messaging, JMS & JBossMQ] - MailListener MDB (EJB3)

burakbayramli do-not-reply at jboss.com
Mon Sep 11 05:02:14 EDT 2006


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, 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3970683#3970683

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3970683



More information about the jboss-user mailing list