You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 30, 2019. It is now read-only.
My interpretation from EJB3.2/§16.2.2 is that you can't have ThreadLocal's, the main reason being that thread management is not portable across server implementations. As we know, there are no guarantees on threads, so it's not reliable at best, and probably dangerous.
From this, ThreadLocal usage can't be portable. Introduction of §16.2.2 says this:
"This section describes the programming restrictions that a Bean Provider must follow to ensure that the
enterprise bean is portable and can be deployed in any compliant EJB container. The restrictions apply
to the implementation of the business methods. Section 16.3, which describes the container's view of
these restrictions, defines the programming environment that all EJB containers must provide."
So, shouldn't there be some specific paragraph on ThreadLocal, or a more generic which would cite ThreadLocal usage as an example?
My interpretation from EJB3.2/§16.2.2 is that you can't have ThreadLocal's, the main reason being that thread management is not portable across server implementations. As we know, there are no guarantees on threads, so it's not reliable at best, and probably dangerous.
From this, ThreadLocal usage can't be portable. Introduction of §16.2.2 says this:
"This section describes the programming restrictions that a Bean Provider must follow to ensure that the
enterprise bean is portable and can be deployed in any compliant EJB container. The restrictions apply
to the implementation of the business methods. Section 16.3, which describes the container's view of
these restrictions, defines the programming environment that all EJB containers must provide."
So, shouldn't there be some specific paragraph on ThreadLocal, or a more generic which would cite ThreadLocal usage as an example?