Actually according to my interpretation of what I have read I think in the cases where the delivery system does not get a acknowledgement of the message a redelivery takes place. For a CMT the acknoledgement is always tied up with the transaction. So if transaction rolls back we get the redelivery...even if it is done by calling setRollBackOnly()... where as in the case of a BMT Message bean the transaction is tied to the method completion. So if we setRollBack using code and the method returns fine...i mean completes then no redelivery happens. Only if we get a system exception ..where the method fails to complete we get a redelivery.
posted 16 years ago
And yes we should not throw Runtime exceptions...it is just that something which we are not expecting happens then these exceptions are generated from the running code. So they are propogated automatically. I think by that the specs means that we should not explicitly throw any runtime exception.