EntityManagerFactory is closed, Hibernate
问题 I have recently created a web service that uses a static method in Java to obtain a list of items from the database. The web service works perfectly and returns JSON back to the caller. However, it works only once. If you try to refresh or make a new request, I get a EntityManagerFactory is closed error. Here's how the Web Service class looks like: public class WebService extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws