[jboss-user] [JBoss Seam] - Re: Using Jbpm Identity component in Seam

fzaker do-not-reply at jboss.com
Mon Aug 6 10:53:27 EDT 2007


But in dvdstore sample, Identity and Actor are using side by side:

  |    public boolean authenticate()
  |    {       
  |       User found;
  |       try {
  |           found = (User) 
  |               entityManager.createQuery("select u from User u where u.userName = #{identity.username} and u.password = #{identity.password}")       
  |                            .getSingleResult();
  |       } catch (PersistenceException e) {
  |           return false;
  |       }
  | 
  |       sessionContext.set(USER_VAR, found);
  | 
  |       actor.setId(identity.getUsername());
  | 
  |       if (found instanceof Admin)
  |       {
  |          actor.getGroupActorIds().add("shippers");
  |          actor.getGroupActorIds().add("reviewers");
  |          identity.addRole("admin");
  |       }
  |       
  |       return true;
  |    }
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071221#4071221

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071221



More information about the jboss-user mailing list