Upon invoking getRollbackOnly() method by a business method in an entity bean, which transaction attribute settings will lead the ejb container to throw an exception?

Options
- Required
- RequiresNew
- Never
- Mandatory


CORRECT ANSWER : Never

Discussion Board
getRollbackOnly()

getRollbackOnly() permits the application to rollback to the previous state. CMT calls up getRollbackOnly() method to find out if the transaction they’re in is already dead or stopped working. This method can be called outside any transaction and it can't be called which has the support transaction attribute. It can't be called because it has nothing to rollback. It will also never allow the ejb container to throw and exception in case of calling getRollbackOnly() method by a business method in an entity bean. So the correct answer to is "never".

Rohit Sharma 08-22-2014 07:45 AM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement