I've been reading about using Thread Local in web applications and the general use case is to generate a transaction id in a filter so that the rest of the web application running in the thread local will have access to that transaction id.
Thread Local is essentially a way to create a global variable so that you don't have to create a bean that generates said global data and pass that bean around to other classes, or inject it into the other classes? I am not sure I understand the difference between per-thread requests and servlet requests that already run in their own thread. In other words, what is the difference between using a Thread Local variable vs any other variable that is created inside a filter, or during a normal servlet request?