• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Accessing HTTP session from business layer

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sudhakar,
No. You'll need to extract that information and pass it to your business layer.
 
Their achilles heel is the noogie! Give them noogies tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic