*
The moose likes Websphere and the fly likes Accessing HTTP session from business layer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Accessing HTTP session from business layer" Watch "Accessing HTTP session from business layer" New topic
Author

Accessing HTTP session from business layer

surya sudhakar
Greenhorn

Joined: Jun 11, 2002
Posts: 18
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

Joined: May 26, 2003
Posts: 31068
    
232

Sudhakar,
No. You'll need to extract that information and pass it to your business layer.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Accessing HTTP session from business layer