Usage of ThreadLocal: per-thread Singleton and per-thread LoggingShould you require a refresh of what ThreadLocals in Java are and how they work, refer to this article first. You can then proceed with the current article for understanding two of the most common uses of ThreadLocals in Java.per-thread Singleton impl using ThreadLocalSuppose you have a need of having a JDBC Connection objects per
This post first appeared on Geek Explains: Java, J2EE, Oracle, Puzzles, And Problem Solving!, please read the originial post: here