开发者

SessionContext RollBackOnly and MDB's

Having an MDB that receives a message in a transaction and then does several EJB calls if I call in one of those EJB's this.sessionContext.setRollbackOnly() will this 开发者_如何学JAVAtrigger the JMS message's redelivery ?

All the EJB methods are marked with Requires_New transaction attribute.


No, because the MDB's transaction will be suspended while EJBs annotated with @REQUIRES_NEW are being processed — each within its own transaction. Additional assumption is that setRollbackOnly() is the only effect of rolling back an EJB's transaction, that is the EJB exited properly and did not throw any exception (after voting for rollback, further interaction with the resource may cause an exception from the javax.ejb.EJBException family to be thrown).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜