Announcement Announcement Module
Collapse
No announcement yet.
EJBContext availability in MethodBeforeAdvice Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • EJBContext availability in MethodBeforeAdvice

    Hi,

    Please forgive me if I am asking a stupid question, I am very new to AOP trying to learn and I am cofused about this scenario,

    my situation is that I want to intercept any ejb call to my ejb layer and perform some function so that I don't have to do this over and over again in EJBs (for example, I want to setup LOG4J MDC/NDC with some user sepecific unique identifier(userid/userlogon) which can be logged into log file and in the web layer we are setting this up using filters. ) I thought I could create an Interceptor and do it their but I dont know how can I get user information in this interceptor, BTW our plan is to use J2EE security so I can use getPrincipal from EJBContext, but I am not sure in the interceptor if this object can be available if it can how?

    AOP Gurus please help.

    Thanks in advance.
Working...
X