Package org.apache.james.user.jpa.model

Examples of org.apache.james.user.jpa.model.JPAUser


    public boolean addUser(String username, String password) {
        EntityManager entityManager = entityManagerFactory.createEntityManager();
        final EntityTransaction transaction = entityManager.getTransaction();
        try {
            transaction.begin();
            JPAUser user = new JPAUser(username, password, algo);
            entityManager.persist(user);
            transaction.commit();
            return true;
        } catch (PersistenceException e) {
            logger.debug("Failed to save user", e);
View Full Code Here


        }
        EntityManager entityManager = entityManagerFactory.createEntityManager();
        final EntityTransaction transaction = entityManager.getTransaction();
        try {
            transaction.begin();
            JPAUser user = new JPAUser(lowerCasedUsername, password, algo);
            entityManager.persist(user);
            transaction.commit();
        } catch (PersistenceException e) {
            getLogger().debug("Failed to save user", e);
            if (transaction.isActive()) {
View Full Code Here

TOP

Related Classes of org.apache.james.user.jpa.model.JPAUser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.