Java EE 7 Application Developer — Question 29
Which statement is true about JAX-RS resource implementation?
Answer options
- A. The REST resource implementation class must extend the javax.ws.rs.core.Application class
- B. The REST resource class can be implemented as a stateful Enterprise JavaBean (EJB).
- C. The REST resource class can be implemented as a Plain Old Java Object (POJO).
- D. The REST resource implementation class must not be final.
Correct answer: A
Explanation
The correct answer is A because JAX-RS requires the resource implementation class to extend javax.ws.rs.core.Application to function properly as a RESTful service. Option B is incorrect because while EJBs can be used, it is not a requirement for JAX-RS. Option C is also valid, but does not meet the specific requirement asked in the question. Option D is incorrect as there is no restriction on the resource implementation class being declared final.