Hopefully solved issue with getEntityManager. Closing it in getByUserName and now it seems to work. If this really work, do same with all methods that uses getEntityManager!