[jboss-user] [EJB 3.0] - EJB3 MESSAGE DRIVEN BEAN WORKS ONCE & NEVER AGAIN UNTIL JBOS
do-not-reply at jboss.com
Thu Feb 5 14:18:54 EST 2009
I've been using a simple Message Driven Bean to grab new emails from an imap account for the last 18 months very successfully on 4.2.1 AS
Bean code :
* EJB3 Message-Driven Bean (MDB).
* Called for every email received to an IMAP account
// @ActivationConfigProperty(propertyName="port", propertyValue="10143"),
@ActivationConfigProperty(propertyName="userName", propertyValue="anemailadd at somewhere.org.uk"),
public class ReceiverMDB implements MailListener
@PersistenceContext(unitName = "default")
private EntityManager em;
public void onMessage(Message msg)
(NOTE : I believe 'maxMessages' is ignored, so doesn't do anything)
Recently, we have been doing some testing on upgrading to 4.2.3 and something seems to be effecting this bean on our live server - Now when JBoss starts the bean triggers once and will happily devour 450 emails. But once it's finished getting the first block of pending emails, it never triggers again.
There's no exceptions. The bean's 'onMessage' never seems to get triggered. Even going onto the JBoss Console and stopping/starting/destroying/creating etc doesn't get the bean working.
Worse still going back to 4.2.1 doesn't seem to help. And only restarting JBoss clears the pending emails.
Does anyone have experience of similar issues with MDBs, especially with the mail-ra.rar resource? Or can anyone help?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4207467#4207467
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4207467
More information about the jboss-user