Um... my response didn't say anything about a web application or web app scopes--any
Java program can store state in a globally-accessible location, either using a singleton, an in-memory DB, or whatever. Any solution would work, and could be used either directly by the app (means modifying source), or via AOP (no source modification, but minor "magic" if you're not aware how it's being done, which can cause maintenance issues).
What else do you want to know?