Hello.
I am coding a small webapp with the help of Maven and Jetty. I'm
having a hard time trying to inject the EntityManagerFactory inside a
Servlet (@Webservlet):
@WebServlet("/test")
public class TestServlet extends HttpServlet {
@PersistenceUnit(unitName="pu")
private EntityManagerFactory emf;
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException {
emf... // is null
}
It's always null. In the other hand
Persistence.createEntityManagerFactory("pu") works.
Am i doing anything wrong here?
Thank you!
Luciano G Santos
_______________________________________________
jetty-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/jetty-users