Discussion:
[Announce] Question regarding Stateless SB and ThreadLocal
is_maximum
2009-03-11 06:16:03 UTC
Permalink
Hello

In our application we contract to have request informations in all the DTOs
coming from the clients. So in order to make these information accessible
across the application in request scope I have defined a class in which a
ThreadLocal is defined as final static and also a default interceptor that
extract the request information from the method parameter using the
InvocationContext.

But now it seems that this ThreadLocal doesn't work in container. Since
inside a service method a bunch of services from other SLSBs will be called,
my gues is that container may or may not create new threads for them so we
can't rely on this ThreadLocal benefits.

My question is if I am right how we can make this information accessible in
request scope across the application just like old programs that uses the
magic of thread local.

I appreciate of you share your experience on this


-----
--
Regards

Mohammad Norouzi

Help each other to reach the future faster

http://pixelshot.wordpress.com Pixelshot Photoblog

http://brainable.blogspot.com Brainable Blog
--
View this message in context: http://www.nabble.com/Question-regarding-Stateless-SB-and-ThreadLocal-tp22449384p22449384.html
Sent from the Sun - Ejb-Interest mailing list archive at Nabble.com.

===========================================================================
To unsubscribe, send email to ***@java.sun.com and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
***@java.sun.com and include in the body of the message "help".
Loading...