2. onMessage (with Not_supported attribute) calls other bean (with required ) where other bean gets a system exception.
Result : Other bean is discarded, what happens to MDB? What it throws? Is the message redelivered to it again or is it simply discarded?
4. onMessage itself throws ApplicationException???
Result : ???
i set context.setRollBackOnly explicitliy on onMessage method with required attribute.
Result : ???
with Required attribute - means its CMT, context.setRollbackOnly - it can be done only with BMT, so illegalStateException raised, bean instance discareded
I think you meant the opposite, EJBContext.setRollbackOnly can be called only by Beans using CMT. If you call it from beans using BMT you will get IllegalStateException.
When using BMT or CMT, if there is a system exception in the onMessage method, the message will be redelivered. If the bean uses BMT and sets the transaction to rollback, then the message is not redelivered. If the bean uses CMT (Required) and sets the transaction to rollback, then the message is redelivered.
1. onMessage (with Required attribute) calls other bean (with required also) where other bean gets a system exception.
Result : Other bean is discarded, MDB Transaction is rolledback and same message will be redelivered to onMessage method again.
2. onMessage (with Not_supported attribute) calls other bean (with required ) where other bean gets a system exception.
Result : Other bean is discarded, what happens to MDB? What it throws? Is the message redelivered to it again or is it simply discarded?
3. onMessage itself throws a system exception.
Result : MDB is discarded, it throws this system exception to container.
4. onMessage itself throws ApplicationException???
Result : ???
5. i set context.setRollBackOnly explicitliy on onMessage method with required attribute.
Result : ???
<a href="http://www.sealordresortarnala.com" target="_blank" rel="nofollow">http://www.sealordresortarnala.com</a>
1. onMessage (with Required attribute) calls other bean (with required also) where other bean gets a system exception.
Result : Other bean is discarded, MDB Transaction is rolledback and same message will be redelivered to onMessage method again.
2. onMessage (with Not_supported attribute) calls other bean (with required ) where other bean gets a system exception.
Result : Other bean is discarded, what happens to MDB? What it throws? Is the message redelivered to it again or is it simply discarded?
3. onMessage itself throws a system exception.
Result : MDB is discarded, it throws this system exception to container.
4. onMessage itself throws ApplicationException???
Result : ???
5. i set context.setRollBackOnly explicitliy on onMessage method with required attribute.
Result : ???
a wee bit from the empire
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|