Coffee Cram: Mock Exam Answers

  1. What is true when an entity bean’s client receives a javax.ejb.EJBException? (Choose all that apply.)

    (spec: 374)

    A.

    The client must be remote.

    - Remote clients get RemoteException

    B.

    The client must be local.

    C.

    A client will never receive this exception.

    D.

    The client must handle or declare this exception.

    E.

    This exception can only occur if the client is in a transaction.

  2. Which scenario will cause a java.rmi.NoSuchObjectException to be thrown? (Choose all that apply.)

    (spec: 374)

    A.

    A remote client invokes a method on a stateful session bean which has been removed.

    B.

    A remote client invokes a method on an entity bean which has been removed.

    - client gets FinderException or ObjectNotFoundException (subclass of FinderException)

    C.

    A remote client invokes a finder method with invalid ...

Get Head First EJB now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.