[jboss-user] [JBoss Seam] - Re: Assigning an Actor for SEAM-jBPM integration

petemuir do-not-reply at jboss.com
Mon Oct 9 17:49:34 EDT 2006


I would assume that at some point you make the user (username at the very least) accessible as a Seam managed object - i.e. you have devised a way of knowing, within seam, who is logged in.

So just add the Actor bit to that e.g.

@Out(scope=SESSION)
  | User currentUser;
  | ...
  | @Factory("currentUser")public void loginToSeam() {
  |    String username = retrieveCurrentUserFromCustomLoginMethod().getUserName();
  |    currentUser = em.find(User.class, username);
  |    Actor.instance.setId(username);
  | }

Then make sure you reference currentUser on the first (every?) page to be hit (you could have a non-rendered outputText for example).

Though maybe the new security api will have hooks for this sort of thing in?

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

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



More information about the jboss-user mailing list