Which exception can be received in the client as a result of invoking the work method?

Given:
1. public class MyException extends Exception { }
The remote business interface Foo declares a method work():
5. public void work() throws MyException;

The bean class FooBean contains the following:
10. @Stateless
11. @Remote(Foo.class)
12. public class FooBean {
13. public void work() throws MyException {
14. throw new MyException();
15. }
Which exception can be received in the client as a result of invoking the work method?

Given:
1. public class MyException extends Exception { }
The remote business interface Foo declares a method work():
5. public void work() throws MyException;

The bean class FooBean contains the following:
10. @Stateless
11. @Remote(Foo.class)
12. public class FooBean {
13. public void work() throws MyException {
14. throw new MyException();
15. }
Which exception can be received in the client as a result of invoking the work method?

A.
a MyException

B.
a javax.ejb.ConcurrentAccessException

C.
a javax.ejb.EJBException that wraps an instance of MyException as the root cause

D.
a java.rmi.RemoteException that wraps an instance of MyException as the root cause



Leave a Reply 0

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