how to use thread local in java

http://www-128.ibm.com/developerworks/java/library/j-threads3.html

Problems using thread local

Make sure you clean up the thread local before returning the thread

Thread.currentThread().getId()

jdk 1.5 docs

I couldn't find any, but I suppose you could use

int i = Thread.currentThread.hashCode();

public static ThreadLocal s_tl = new ThreadLocal();

s_tl.set(null);

s_tl.set(new TransactionFacilityTL());

private TransactionFacilityTL getTransactionFacilityTL()
{
	return (TransactionFacilityTL)s_tl.get();
}