Skip to content
This repository was archived by the owner on Jan 30, 2019. It is now read-only.
This repository was archived by the owner on Jan 30, 2019. It is now read-only.

clarify ThreadLocal usage in ejb environment #123

@glassfishrobot

Description

@glassfishrobot

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?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions