Nagin Kothari wrote:
My application has Interceptor with following code
public class ApplicationIterceptor implements Interceptor {
public Object invoke(Invocation invocation) throws Throwable {
EJBContainerInvocation ejb = (EJBContainerInvocation) invocation;
Principal p = ejb.getBeanContext().getEJBContext().getCallerPrincipal();
}
}
In jboss 4.3.2 ejb.getBeanContext() was returing value, however in jboss 6.0M2 it is returning null. Is there any change in thw way for getting CallerPrincipal in Jboss6?
thanks in advance.
I haven't looked into the details yet, but why are you using a AOP interceptor and accessing JBoss internal classes to get hold of the caller principal?