Here is a problem I am having with reading from a MQ queue. I am reading messages from a queue. I then want to ftp this information. If my ftp fails, I want to block and try read the same message again. But when I read from the queue, the message is taken off. How do I read so that the message is not removed from the queue ? Can anyone help ?
This should be an MQ vendor, or an appserver vendor specific thing. Maybe not - it may be part of JMS.... Either way, try throwing an exception from your onMessage() method. Then look at the MQ and appserver docs to find out whats up.
This is a part of JMS. You're asking who's the transaction manager -- in a J2EE app server, that would be the application server itself. Take a look at the EJB specification on MDB's (or Richard Monson-Haefel's excellent book on JMS) and learn more about EJB transactions with JMS. Basically, in your Message Driven Bean, when the FTP fails, you will do a setRollbackOnly() and the message will be returned to the queue. Kyle