if (activeSession != null) {
printMerchantWarning("Merchant session active for customer "+activeSession.getCustomer().getName()+". Please end this session first.");
} else {
Session session = HibernateUtil.getSessionFactory().openSession();
PlayerHibernateDAO myDAO = new PlayerHibernateDAO();
myDAO.setSession(session);
Transaction tx = session.beginTransaction();
Player myCustomer = myDAO.getPlayerByName(newCustomer);
tx.commit();
if (myCustomer == null) {
myHandler.debugInfo("New player: "+newCustomer);
tx = session.beginTransaction();
myCustomer = new Player();