Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Accessing ThreadLocal in EJB

843833Feb 17 2009
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 !
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 17 2009
Added on Feb 17 2009
0 comments
147 views