hi i want to load the lazy collection. but the transaction seems to be closed already.

anny ideas??

i have this:

public User getFullUserByUsername(String username) throws UsernameNotFoundException { List users = getHibernateTemplate().find("from User where username=?", username);
        if (users == null || users.isEmpty()) {

throw new UsernameNotFoundException("user '" + username + "' not found...");
        } else {
            User user = (User) users.get(0);
            log.debug("load lazy collection");
            user.getPasswordHistory().size();  //<<<< lazy loading exception
            return user;
}

thanks

tibi


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net
For additional commands, e-mail: users-h...@appfuse.dev.java.net

Reply via email to