[jboss-user] [EJB 3.0] - Re: how to get username of logged in user
mimra
do-not-reply at jboss.com
Fri Dec 15 03:46:28 EST 2006
In your session bean you can use the following to the user name:
| ejbContext.getCallerPrincipal()
|
To get the EJB context you can inject it using:
| @Resource
| SessionContext ejbContext;
|
You should really consider using an interceptor to perform audit logging to keep your business logic clean.
/Michael
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994149#3994149
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994149
More information about the jboss-user
mailing list