Choose the option that best evaluates the example:

Given the two classes:

Choose the option that best evaluates the example:

Given the two classes:

Choose the option that best evaluates the example:

A.
This is a valid example of two EJBs used as JAX-RS resources, one a root resource and the other a subresource.

B.
This is an invalid example, because EJBs that are to be used as JAX-RS subresources have to match the type of EJB of their “parent” resource.

C.
This is an invalid example, because singleton EJBs used as JAX-RS resources must explicitly state what locking strategy they will require.

D.
This is an invalid example, because the JAX-specification only allows root resource types to also be EJBs.



Leave a Reply 1

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


leo yu

leo yu

Not think two EJBs used as JAX-RS resource/subresource has practical meaning, set EJB as JAX-RS root resource is easy to maintain and enhance.Think even in the legacy EJB, nested EJB is not recommended.