anonymous wrote : If I wish to send a large number of messages in sequence, the MessageListener won't start processing the messages until the sender has finished sending all its messages - the while()-loop has ended and the method invoked in the Stateless Session EJB has finished.
This is what is happening in your case: - I guess you have Container managed transaction on your bean - When the method(meant to send messages) on the bean is called, the container begins a transaction. - The transaction is committed only when the method completes. - So even if you are sending 'n' number of messages through the loop, the messages wont be actually delivered until the transaction is committed. You will have to decide about whether to use Container managed transaction or Bean Managed transaction(which allows you to start and commit the transaction wherever you want in the bean). Or may be even try to implement the requirement using a different logic instead of using a while loop. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3950436#3950436 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3950436 _______________________________________________ JBoss-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
