I've had similar problem and this is how I solved my problem. Don't know if it 
helps to solve your problem. 

Basically I created another wrapper object UserService for User. When 
currentUser is requested, I manually check the sesssion and decides what to 
return. Here is some my code.

UserService.java

  | @Name("currentUser")
  | @Scope(SESSION)
  | public class UserService
  | {
  | 
  |     @Unwrap
  |     public User getUser()
  |     {
  |         return getMyCurrentUser(...);
  |     }
  | ...
  | }
  | 

User.java

  | @Entity
  | @Name("dummyUser")
  | @Scope(SESSION)
  | @Roles(
  | { @Role(name = "loginUser", scope = ScopeType.EVENT),
  |         @Role(name = "newUser", scope = ScopeType.CONVERSATION) })
  | public class User implements Serializable
  | {
  | ...
  | }
  | 

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

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


_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to