||Understanding Classloaders: log4j in a J2EE Environment|
|Subject:||threads in EJB ?|
Response to: threads in EJB ?
The issue of threads as they relate to EJBís can be confusing. Actually, the specification reads: The enterprise bean must not attempt to manage threadsÖ. It would be impossible to guarantee that every 3rd party library an application utilizes does no thread management. The spirit of this restriction boils down to two issues: risks of reentrancy, and the containerís overall ability to control the runtime environment. If an EJB creates a thread, and that thread executes code that results in the creation of other EJB instances, or passes through code that the container expects to have full control over, it can (and probably will) compromise the containerís ability to manage concurrency issues and other things. This is a form of reentrancy.
Hear us Roar