结构: Simple
Abstraction: Variant
状态: Draft
被利用可能性: unkown
Thread management in a Web application is forbidden in some circumstances and is always highly error prone.
Thread management in a web application is forbidden by the J2EE standard in some circumstances and is always highly error prone. Managing threads is difficult and is likely to interfere in unpredictable ways with the behavior of the application container. Even without interfering with the container, thread management usually leads to bugs that are hard to detect and diagnose like deadlock, race conditions, and other synchronization errors.
Language: {'cwe_Name': 'Java', 'cwe_Prevalence': 'Undetermined'}
范围 | 影响 | 注释 |
---|---|---|
Other | Quality Degradation |
策略:
For EJB, use framework approaches for parallel execution, instead of using threads.
In the following example, a new Thread object is created and invoked directly from within the body of a doGet() method in a Java servlet.
bad Java
映射的分类名 | ImNode ID | Fit | Mapped Node Name |
---|---|---|---|
7 Pernicious Kingdoms | J2EE Bad Practices: Threads | ||
Software Fault Patterns | SFP3 | Use of an improper API |