try {
Object idf = PersistenceSessionUtil.createSession();
EntityManager session = PersistenceSessionUtil.getSession();
EntityTransaction tx = session.getTransaction();
tx.begin();
Userlevel uslevel = new Userlevel();
uslevel.setStarttime(new Date());
uslevel.setDescription(description);
uslevel.setStatuscode(new Integer(myStatus));
uslevel.setDeleted("false");
session.merge(uslevel);
tx.commit();
PersistenceSessionUtil.closeSession(idf);
} catch (Exception ex2) {
log.error("[addUserLevel]", ex2);