title: Hibernate is returning an exception when I try to use remove()
body: <p>I have this method to delete an entity from my DB:</p>
  
  <pre><code>T entity;
  
  em = HibernateManager.getEntityManager();
  
  em.getTransaction().begin();
  entity = em.find(entityClass, entityId);
  em.remove(entity);
  em.getTransaction().commit();
  
  em.close();
  return true;
  </code></pre>
  
  <p>When i call it, hibernate returns this exception:</p>
  
  <pre><code>java.lang.IllegalStateException: EntityManager is closed
  </code></pre>
  
  <p>What am I doing wrong?</p>