Announcement Announcement Module
No announcement yet.
Obtain Information of the Application and to Send for Class Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Obtain Information of the Application and to Send for Class

    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,


  • #2
    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.