wood burning stoves 2.0*
The moose likes JBoss/WildFly and the fly likes Logging in different servers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Logging in different servers" Watch "Logging in different servers" New topic
Author

Logging in different servers

Ramesh Sunkara
Ranch Hand

Joined: Mar 01, 2010
Posts: 78
Hi Folks,

I need some suggestion/guidance regarding logging in my project.


My Requirement is:


I have 2 components in my project which are deployed in two different Jboss 5.1.G.A servers.

My first component is deployed as an http servlet where as the other one is Webservice(Java)

Now, without any code changes, i want to trace a request which involves both the components.


I tried to use Web-Filters and MDC(log4j) and tried to keep session id in the logs.


But when the control goes to my second component, session is obviously changed. So i cant use session no long.


Can you guys, help me out from this ...


I want same unique id to be present in both the components logs for a particular request.

How can i achieve this?

I also tried to add Sesssion id as attribute to the http request and then called doChain() method of the filter. But it didnt worked


Can i read the http request object to get some data from it and use it in MDC(Mapped Diagnostic Context)


Thanks for you help
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

Now, without any code changes, i want to trace a request which involves both the components.

How much money are you willing to spend? I know some tools can do this but they all cost $$$$$$$. This is not an easy problem to solve, which is why such tools can charge buckets of money for this capability. On the other hand, if you don't mind changing your code...


JBoss In Action
Ramesh Sunkara
Ranch Hand

Joined: Mar 01, 2010
Posts: 78
Thanks Peter
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Logging in different servers
 
Similar Threads
Chapter 6(Session Management) notes (HFSJ) for revision
Compare Apache myFaces to JSF?
tomcat session handling
Session problem!
Java Logging and concurrent users