public boolean testEntityManagerFactory() {
try {
EntityManagerFactory entityManagerFactory = (EntityManagerFactory) new InitialContext().lookup("java:comp/env/jpa/testEMF");
System.out.println("Accessed entity manager factory");
EntityManager entityManager = entityManagerFactory.createEntityManager();
AllFieldTypes allFieldTypes = new AllFieldTypes();
entityManager.persist(allFieldTypes);
System.out.println("saved object");
entityManager.close();
System.out.println("Closed entity manager");
return true;