OpenJPAEntityManager manager = factory.createEntityManager();
final OpenJPAEntityTransaction transaction = manager.getTransaction();
try {
transaction.begin();
manager.createQuery("DELETE FROM JamesUser user").executeUpdate();
transaction.commit();
} catch (Exception e) {
e.printStackTrace();
if (transaction.isActive()) {
transaction.rollback();
}