@Stateless
@Local
public class YourBean implements YourInterface {
@Resource
SessionContext ctx;
public void yourMethod() {
Principal callerPrincipal = ctx.getCallerPrincipal();
}
}
Basically, you have to use annotations like @javax.annotation.EJB and
@javax.annotation.Resource to inject references to Java EE services directly into the
fields of your bean.
Regards
Dalibor
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990365#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...