posted 20 years ago
Hi,
In HFEJ P 497. Sharpen your pencil, the question and solution is as follows
4.Of the six transaction attributes, three of them can be dangerous, with
one in particular being EXTREMELY risky. Keeping in mind that the
Bean Provider is NOT the one who specifies the attributes for the bean�s
methods, which of the six is potentially the most dangerous?
Ans:
Mandatory and NotSupported are dangerous, because they throw exceptions, but Supports is the riskiest.... because it means at runtime you don�t know whether it will run in a transaction or not.
My question, I thought that Mandatory and Never throw Exceptions,How is NOT SUPPORTED dangerous, it just suspends the exiting (if there is one) TX and runs in an unspecified Tx ctx.
Please Help,
Nileesha<br />SCJP 1.4, SCBCD, SCWCD.