Multiple choice technology architecture

You have developed an application consisting of Java EE Stateless session beans. Methods of these beans use simple Java types. You would like to convert them to web services. How can you achieve it?

  1. Update web.xml

  2. Use Resource Injection

  3. Use annotations

  4. Update ejb-jar.xml

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

EJB 3.0 simplifies converting stateless session beans to web services through annotations. By adding @WebService to the bean class and @WebMethod to business methods, the container automatically generates the WSDL and SOAP endpoints. This is much simpler than updating deployment descriptors (web.xml, ejb-jar.xml) or using resource injection (which is for dependencies, not web service configuration).