Hello
I'm working with jServer.
Because of reasons, I buffer some incoming data for later use in the Filter chain. I was thinking of storing the data in a map with the "req" as the key and the data as value.
But I noticed that the data is retained between multiple request. So my guess is that the req instance is reused over multiple request (probably binded to 1 connection?)
I don't want to close the connection each time, as that would severely impact performance.
Is there a way to uniquely ID a request?
I have one option in mind: Generate an ID myself, and store it in the resp instance (in a header e.g) and remove it later on the Filter chain. It would work, but it's not really a nice solution.
Edit: While thinking, Filters in Jetty use the same thread for each request, ID'ing the thread could also be a solution.
Is it possible to ID the current Jetty thread from within a Filter?
Thanks for any help
I'm working with jServer.
Because of reasons, I buffer some incoming data for later use in the Filter chain. I was thinking of storing the data in a map with the "req" as the key and the data as value.
But I noticed that the data is retained between multiple request. So my guess is that the req instance is reused over multiple request (probably binded to 1 connection?)
I don't want to close the connection each time, as that would severely impact performance.
Is there a way to uniquely ID a request?
I have one option in mind: Generate an ID myself, and store it in the resp instance (in a header e.g) and remove it later on the Filter chain. It would work, but it's not really a nice solution.
Edit: While thinking, Filters in Jetty use the same thread for each request, ID'ing the thread could also be a solution.
Is it possible to ID the current Jetty thread from within a Filter?
Thanks for any help
Last edited: