ThreadLocal in Java is another way to achieve thread-safety apart from writing immutable classes.
If you have been writing multi-threaded or concurrent code in Java then you must be familiar with cost of
synchronization or locking which can greatly affect Scalability of application,
but there is no choice other than synchronize if you are sharing objects between multiple threads.
ThreadLocal in Java is a different way to achieve thread-safety, it doesn't address synchronization requirement.
Instead it eliminates sharing by providing explicitly copy of Object to each thread.
Read more:
http://javarevisited.blogspot.com/2012/05/how-to-use-threadlocal-in-java-benefits.html
http://docs.oracle.com/javase/7/docs/api/java/lang/ThreadLocal.html