This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
We have situation where we want to log the user information (id, name etc) in the log statements. In our current implementation we have a logging component (wrapper over Log4j) to log the debug statements both in presentation and business layers.
When the application is accessed concurrently all the log statements from different users are getting mixed up. We want to stamp the user details in the log statements, so that at later point of time we can get all the statements logged by a particular user. This way we think we can debug and track the user clicks in the browser.
Is there a way to get the user related information from the container instead of passing them to the logging component? Logging will be done in both presentation as well as business layer.
In presentation layer as we have access to the HttpREquest object we can get the user details from session very easily. But how can we get the information from business layer?
Is there any support at the WebSphere container level to store some information and later get it from different layers?