[undertow-dev] Efficient and easy way to set and get thread local variables

Girish Sharma scrapmachines at gmail.com
Mon Dec 28 08:16:08 EST 2015


Hi all,

I am really impressed by the throughput I am getting using standalone
undertow server using non-blocking IO and what not.

Now, I have a use case where I need to maintain a per call thread level
boolean flag which needs to be accessible from various parts of the code.
This flag is determined by an exchange attribute (say request header).

So the question is whether there is an easy and efficient way to get a
reference to any exchange attribute (or the exchange itself) from anywhere
in the code? I really don't want to rely on thread locals or custom caches
to do this if there is a way to get a reference. Or if Undertow natively
has similar functionality to set and retreive a thread level flags, I'd be
happy to use that too.

PS: I am still going through list archives, but the UI to go through all of
them is really tiresome :)

-- 
Girish Sharma
B.Tech(H), Civil Engineering,
Indian Institute of Technology, Kharagpur
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20151228/d631753a/attachment.html 


More information about the undertow-dev mailing list