Accessing ThreadLocal in EJB
In the EJB 2.1 specification, it is clearly documented that we can not manage threads.
My question is : can we access an existing ThreadLocal in a EJB instance ?
To be clearer, here is what I want to do:
I have a J2EE Web Application in which I create a ThreadLocal. My Web App use a stateless EJB, in which I want to access my ThreadLocal. Like each Application Server can do what they want, in term of implementation, for instance using their own thread management (one ejb instance for each thread maybe), I am not 100 % sure that I could always retrieve my ThreadLocal.
Am I wright or wrong ?
Thanks !