• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Accessing HTTP session from business layer

 
surya sudhakar
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

Thanks,
Sudhakar
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34198
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sudhakar,
No. You'll need to extract that information and pass it to your business layer.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic