close entitymanager on fail
This commit is contained in:
parent
f2d9c3b4a8
commit
bf4e9daaee
@ -39,6 +39,7 @@ public class JsonPillarServlet extends HttpServlet {
|
||||
if (hiveFqdn != null && hiveFqdn.length() == 19 && hiveFqdn.endsWith(".hostsharing.net") && hiveFqdn.startsWith("h")) {
|
||||
hiveName = hiveFqdn.substring(0, 3);
|
||||
} else {
|
||||
em.close();
|
||||
throw new ServletException("error in hive parameter");
|
||||
}
|
||||
final Query hiveQuery = em.createQuery("SELECT h FROM Hives h WHERE h.name = :hive");
|
||||
|
Loading…
Reference in New Issue
Block a user