| Article: |
Understanding Classloaders: log4j in a J2EE Environment | |
| Subject: | threads in EJB ? | |
| Date: | 2003-06-18 09:04:22 | |
| From: | bclayabt | |
|
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.
|
||
Women in Technology
Hear us Roar
