Reputation: 353
So, Tomcat has its own thread-pool and for each request, it gets a thread (Thread A)from this pool and uses and clears the same after completion.
Is there a way to initialise a thread-local variable when this thread (Thread A) gets initialised?
Purpose here is to calculate the processing time, where I need to set a time on thread creation and will be using this time to calculate the before processing time before sending out to the client.
Upvotes: 1
Views: 226
Reputation: 3174
The processing time corresponds to the time-taken field of the Extended Access Log Valve. Maybe you don't need to reinvent the wheel in this case.
Upvotes: 2