how to use thread local in java

satya - Monday, November 27, 2006 4:47:46 PM

Basics of thread local article

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

satya - Monday, November 27, 2006 4:48:37 PM

Problems using thread local

Problems using thread local

satya - Monday, November 27, 2006 4:48:53 PM

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

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

satya - Thursday, November 30, 2006 10:42:55 AM

How to get a thread id in jdk 1.5

Thread.currentThread().getId()

jdk 1.5 docs

satya - Thursday, November 30, 2006 11:12:47 AM

what about previous jdks.

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

int i = Thread.currentThread.hashCode();

satya - Monday, August 11, 2008 1:47:36 PM

declaring a threadlocal


public static ThreadLocal s_tl = new ThreadLocal();

satya - Monday, August 11, 2008 1:48:34 PM

Removing a thread local


s_tl.set(null);

satya - Monday, August 11, 2008 1:49:02 PM

Placing an object on the thread


s_tl.set(new TransactionFacilityTL());

satya - Monday, August 11, 2008 1:49:32 PM

Getting an object from a threadlocal


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