Client View of Bean  «Prev  Next»

EJB Beans Business Methods - Quiz

1. Which of the following are valid ways a CDI managed bean business method can signal a failure to its caller in Jakarta EE 11?
Please select all the correct answers.
  A. Application-specific checked exceptions declared on the method
  B. Unchecked RuntimeException subclasses
  C. jakarta.ejb.EJBException for system-level failures in EJB session beans
  D. RemoteException

2. Which of the following are valid return types for a CDI managed bean business method in Jakarta EE 11?
Please select all the correct answers.
  A. void
  B. Any serializable domain object
  C. Future or CompletableFuture for @Asynchronous methods
  D. A direct reference to the CDI bean instance itself

3. Which of the following correctly describe the lifecycle scope of a @RequestScoped CDI managed bean in Jakarta EE 11?
Please select all the correct answers.
  A. The bean is created when the request begins and destroyed when it completes
  B. The container manages creation and destruction automatically
  C. The same bean instance is shared across multiple concurrent requests
  D. The bean remains valid for the duration of a propagated request context