Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] pointers to struts and auditing

Hi,
I want to provide an aspect that audits certain method calls in a struts based application. Can anyone give me some good practice on how to do this?
Currently I have an aspect which I have successfully set up to pick out my business methods that I am concerned with but at the business layer, there is no visibility of the httpsession variables that hold my user details. I want to use these user details to add to the auditing messages but don't know how to 'pass' them into the business method.
 
Do I just make the struts action that calls the business method in question the pointcut instead of the business method itself and therefore get a handle on the HttpServletRequest (and therefore the session and its attributes) or should I have some sort of cflow pointcut of my action and business method. I don't really 'get' cflow pointcuts just yet but sort of feel that this is an option.
 
Any suggestions would be most welcome here for someone very new to AOP - even though what I have done so far leads me to believe I will be using aspects much more in the future.
 
TIA
Conrad

Back to the top