Java tutorial
//package com.java2s; import java.util.Map; public class Main { @SuppressWarnings("rawtypes") private static final ThreadLocal ctx = new ThreadLocal(); public static Object get(Object key) { @SuppressWarnings("rawtypes") Map m = (Map) ctx.get(); if (m != null) { return m.get(key); } return null; } }