I would like to know a typically scenario where it would be used.
Dear William,
If you have multiple beans that are paricipating in the same transaction, usually the bean that started the transaction will either call commit or rollback - in case of BMT - to end the transaction. And you can only do that once, which means that you can't rollback a transaction that is already rolled back. So if a bean that is called from another bean that started the transaction, it can mark the transaction for rollback using the setRollbackOnly method, so the caller bean would know and rollback that transaction, because it can't commit it. Now suppose that the second bean marks the transaction for rollback before it calls a third bean. The third bean should know whether that transaction is marked for rollback or not, before it starts to execute its own business logic, and waste time and resources.
[ July 13, 2005: Message edited by: Nadeem Awad ]
Share Knowledge to gain it.<br /> <br />SCJP 1.2, SCDJWS 1.4, SCWCD 1.4, SCBCD 1.3, ICAD