trace - How to add tracing to Java server application -


Suppose I have a Java server application, which I can not understand. I want to know the complete execution sequence of request processing (see examples given below)

 Customer received HTTPRarchcast 12345 (...) header (...) and body (...) Enter WebUserController with HttpRequest 12345 with HttpRequest 12345 Enter UserProcessor.process1 with UserProcessor.process2 createUserRequest (userName = ..., userEmail = ..., ...) with the user enter userDAO.createUser (UserName = ..., userEmail = ... .., ...) the database against the SQL statement (...) With & lt; Host> :: & lt; Exit> exit userDAO.createUser results (...) with UserProcessor.process2 (...) Exit WebUserController with UserProcessor.process1 (...) ... HttpResponse 7890 client ( ...) with header (...) and body (...) ... 

I have only one way to get it: Application code manually to add a trace call. Now I am surprised that there is an automated way to add those trace calls to the code I am thinking of byte instrumentation , which is in the public jurisdiction Let's add a trace call to all public methods. Does this make sense?

Can you suggest any other way to understand how it works?

If it is a development server, then you try to add your IDE to server debug port You can. In this way you can follow the code line from the line from where the breakpoint is set.

This is not definitely if you are talking about acceptance or production server, because you are blocking all other threads by executing code in question.

If you need to enter each description, then AOP will be your best friend as already said by Smtaje.


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -