static ThreadLocal threadContext = new ThreadLocal();
public static ThreadContext getThreadContext() {
if (threadContext.get()==null) {
try {
ProfileLogger logger = ProfilerController.getInstance().createLogger();
ThreadContext context = new ThreadContext(logger);
threadContext.set(context);
} catch (IOException e) {
// TODO: Error handling according JBoss
e.printStackTrace();