Java – Use of volatile variables in concurrency/multi-threading

The problem – Computers typically have multiple CPU Cores (or CPUs). Each Core has one or more dedicated local cache (L1 and L2 cache) Computers also have a main memory (RAM). This memory is shared by all Cores When a thread gets a chance to run, it typically runs on one of the available Cores … Read more

How session management works in Java web applications (e.g. a Tomcat web application)

High-level Flow User requests a webpage Browser sends the request to the web-server The server sees that there is no “session related information/identifier” in the request. So it creates a new session (and a new session identifier – the JSESSIONID) The server sends the JSESSIONID back to the client (e.g. in a cookie, along with … Read more