Hi Roland,

I think that "EntityContext" is EJB2 and no longer supported in EJB3. You can 
get this information from the SessionContext in a SessionBean:
@Resource()
  | private SessionContext sessionContext = null;
  | 
  | public void someSessionBeanMethod()
  | {
  |    Principal principal = this.sessionContext.getCallerPrincipal();
  |    ...
  | }
  | 


Or maybe you could follow this post: 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3968882
It seems that you can use entity callbacks like "@PreUpdate" and use the class 
"org.jboss.security.SecurityAssociation" to get the Principal:

  | @PreUpdate
  | private void someMethod()
  | {
  |    Principal principal = SecurityAssociation.getPrincipal();
  |    ...
  | }

Hope this helps

Wolfgang

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4237664
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to