PDA

View Full Version : Obtain Information of the Application and to Send for Class


ribeirete
Aug 18th, 2004, 05:58 PM
Did I create an aspect class to intercept exceptions with objective of having my prórprias exception classes is working, however would I like that when capturing this exception to record a log file and for that he/she would need to obtain some information of the application as user logado, layer etc. Anybody knows how it could pass those parameters for my class Interceptor?

Observation: Excuse, to have posted this doubt in the session DataAcess, I believe this to be the appropriate session

Thank you,


Fábio

gpoirier
Aug 18th, 2004, 09:09 PM
Well, how to capture the information really depends on the particular information you want to capture, and on your particular application. For the username, if you're in a webapp, the best way would probably to have shared instance hold a ThreadLocal reference on the user, so that you can set it in a before handling the request, then access it whenever you need it. As for the layer, that should probably be obvious from the stacktrace I guess.

Guillaume