Java Magazine, Mar/Apr 2018
ORACLE COM JAVAMAGAZINE MARCH APRIL 2018 21 microservices and containers Create another class in the same package named AcmeEmployeeFacadeREST and add the source code in Listing 6 AcmeEmployeeFacadeREST contains RESTful web service methods The @ Path annotation makes the services contained within this class available via the path rest acmeemployee Listing 6 @ Stateless @ Path acmeemployee public class AcmeEmployeeFacadeREST @ PersistenceContext unitName EmployeeService_ 10PU private EntityManager em public AcmeEmployeeFacadeREST @ GET @ Produces MediaType APPLICATION_ XML MediaType APPLICATION_ JSON public List AcmeEmployee findAll List AcmeEmployee employeeList null try employeeList em createQuery select object o from AcmeEmployee o getResultList catch NoResultException e
You must have JavaScript enabled to view digital editions.