public Person findPerson(String userName) {
EntityManager em = emf.createEntityManager();
logger.finest("In findPerson for " + userName);
try {
Query q = em.createNamedQuery("getUserByName");
q.setParameter("userName", userName);
List<Person> users = q.getResultList();
if (users.size() < 1) {
logger.warning("Person with username = " + userName + " not found");
return null;