Announcement Announcement Module
Collapse
No announcement yet.
Obtain Information of the Application and to Send for Class Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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,


    Fábio

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

    Guillaume

    Comment

    Working...
    X