Which is true about the result of this method invocation assuming execution reaches Line 12?

FooBean and BarBean are both EJB 3.0 stateless session beans with container-managed
transaction demarcation. All business methods in FooBean have transaction attribute REQUIRED,
and all business methods in BarBean have transaction attribute REQUIRES_NEW. The business
method foo in FooBean invokes the business method bar in BarBean.
Given:
10. public class BarBean {
11. public void bar() {
12. throw new RuntimeException(“unexpected error…”);
13. }
Which is true about the result of this method invocation assuming execution reaches Line 12?

FooBean and BarBean are both EJB 3.0 stateless session beans with container-managed
transaction demarcation. All business methods in FooBean have transaction attribute REQUIRED,
and all business methods in BarBean have transaction attribute REQUIRES_NEW. The business
method foo in FooBean invokes the business method bar in BarBean.
Given:
10. public class BarBean {
11. public void bar() {
12. throw new RuntimeException(“unexpected error…”);
13. }
Which is true about the result of this method invocation assuming execution reaches Line 12?

A.
FooBean.foo method receives javax.ejb.EJBException.

B.
The BarBean bean instance is in ready state for the next invocation.

C.
FooBean.foo method receives javax.ejb.EJBTransactionRolledbackException.

D.
FooBean.foo method receives the original RuntimeException thrown from BarBean.bar method.



Leave a Reply 0

Your email address will not be published. Required fields are marked *