@Transactional(readOnly = false) public Object doWork(org.hibernate.Session session, ServiceFactory sf) { return ((LocalAdmin) sf.getAdminService()).checkPassword( _principal.getName(), credentials, false); } });
@Transactional(readOnly = true) public Object doWork(org.hibernate.Session session, ServiceFactory sf) { try { return ((LocalAdmin) sf.getAdminService()).checkPassword( _principal.getName(), credentials, true); } catch (Exception e) { // thrown if ldap is trying to create a user; // primarily a performance optimization to prevent // creating an event, etc. for all the password // checks which will *not* try to create a user. return null; } } });