public void deleteByUserName(String userName) {
		EntityManager em = PersistenceManager.createEntityManager();
		try {
			em.getTransaction().begin();
			
			List<Openchatroomsmessage> ochrms = em.createNamedQuery("Openchatroomsmessage.GetByUser", Openchatroomsmessage.class)
				.setParameter("u", userName)
				.getResultList();
			for (Openchatroomsmessage openchatroomsmessage : ochrms) {
				em.remove(openchatroomsmessage);
			}
			
			em.getTransaction().commit();
		} finally {
			if (em.getTransaction().isActive())
				em.getTransaction().rollback();
			em.close();
		}
	}