Hi, on HF, page 542, I'm reading the Bean provider's responsibilities for application exceptions. The pages says:
'If you catch an application exception, and find that you can't continue the transaction, call setRollbackOnly() before throwing the exception to the Container.'
At this point I have got a doubt. In the chapter about transaction, I remember that it was clearly stated that only CMT beans with a transaction attribute set to 'Required', 'RequiresNew' and 'Mandatory' should invoke the setRollbackOnly() method, otherwise an exception (it seems to me
IllegalStateException but I'm not sure) is thrown. But if the CMT transaction attributes are *NOT* responsibility of the Bean provider, how could the bean provider start from the perspective that the method will have only one of the three required attributes? Doesn't this limit bean's portability (one of the reason why CMT beans will be used most of the time)?
Marco